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