Level 10 : What will be the output of the following Python code?


class tester:
    def __init__(self, id):
        self.id = str(id)
        id="224"
 
temp = tester(14)
print(temp.id)

Author: SandhyaR | Tags: class | 1736+ Python FAQs | Share
python-django | operator | fabs-function | name-mangling | sorted | deep-copy | version-check | math-copysign | polymorphism | typeerror | design-principle | class-and-inheritance | loop-control | comprehension | list-operation | tuple-unpacking | function-and-scope | bitwise | matplotlib | global-variable | max-min | file-handling | exponentiation | statement | map-function | shallow-copy | dictionaries | head-and-tail | zip | mathematical-function | dictionary | input | sys | collections | math | virtual-environment | precedence | global-variable | version | static-method | namedtuple | indexing | counter | iterable | input-function | scientific-notation | generators-in-python | global | pep | print-statement | dicts | list-comprehension | while-loop | filter-function | input-function | mapping-function | sys-module | descriptors | print | python-history | context-manager | destructor | debugging | list-method | objects | data_structure | python-module | higher-order-function | sum-function | condition | encapsulation | regular-expression | exception-handling | string-manipulation | min-function | list-comprehension | enumerate() | heap-memory | min-max-function | boolean | syntax | binary | syntaxerror | control-statement | complex-number | list | file_handling | logical-operation | identifier | comment | mathematics | application | immutable-data-type | with-statement | default-mutable-argument | loops | floating-point-precision | loop | class-and-instance-variable | zip-function | built-in | package-management | binary-operation | type-conversion | staticmethod | comparison | string-method | conditional-statement | datetime | factorial-function | swapping | yield | memory-management | numpy | type_conversion | oops | numeric | file-handling | docstring | identity-operator | precedence-and-associativity | assignment-operator | mysql | identity-operator | integer | operand | method | lambda | access-modifier | range | turtle | control-flow | data-type | odd-number | matrix-list-comprehension | iterator | choice | overflow | format | implementation | round-function | namespace | module | center | string | rollback | generator | __init_subclass__ | filter | int | array | string-concatenation | python | compute | keyword | id-function | function-argument | exception-handling | return-statement | global-keyword | memory | attribute | threading | logical-operator | pandas | assert | def | class | asyncio | basic | round | functions | matrix | data-structures | else-statement | escape-operator | multithreading | postfix | lists | recursion | variable | multiple-inheritance | classes | data-structure | lambda-function | feature | built-in-function | exception | error | slicing | multiprocessing | set-operation | logical-operator | list-vs-tuple | call | encoding | oop | join | string-slicing | arithmetic-operation | sorting | parameter | command-line-parsing | counter-function | decimal | decorator | bitwise-operator | formal-and-actual-parameter | collection | list-slicing | __future__ | constructor | file | bitwise-operator | pseudocode | string-slicing | class-and-object | thread | installation | slice | immutability | arithmetic-expression | control-flow | interpreter | goto-function | library | update | copy | operator-or | list-join | regex | init | built-in-function | string-method | datatype | string-formatting | invalid-list | expression | for | raise | async | tuple | zfill-function | mutable | list-indexing | operators | operator-overloading | pickling-&-unpickling | list-mutation | operations | touples | match | sum() | random-function | inheritance | object-attribute | syntax-error | indentation | split | nested-loop | gil | lambdas | function | functional-programming | frozenset | methods | while-and-for-loop | random | operator-and | recurssion | software-design | conversion | inherit | generators | complex | set | python-repl | syntax-error | append | boolean-and-non-boolean | conditional-statement | stack | benefit | import-method | magic-method | virtual-environment | expand-tab | data-type | while-else-loop | string-iteration | error-handling | data-structure | string-formatting | python_version | asyncio-module | __all__-attribute | type-conversion ...