Level 9 : 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 | 1859+ Python FAQs | Share
single-inheritance | list-comprehension | max-min | working-with-binary-files-(rb,-wb) | reading:-read(),-readline(),-readlines() | swapping | staticmethod | pass | return-statement | recursion | parameter | binary | basic | sum-function | object-attribute | control-statement | data-types | booleans | asyncio-module | slice | class-decorators | matplotlib | def | command-line-parsing | async | syntax-error | type-conversion | conditional-statement | counter | recurssion | access-modifier | typeerror | dictionary | using-join()-and-is_alive()-methods | using-else-and-finally | data-structures-in-python | boolean | print-statement | set | condition | raise | writing:-write(),-writelines() | rollback | thread | print | decimal | default-arguments | numpy | __init_subclass__ | compute | magic-method | complex | copy | list,-set,-and-dictionary-comprehensions | bitwise-operator | walking-through-directories-using-os.walk() | class-and-inheritance | debugging | conditional-statements | pandas | data-structure | arbitrary-arguments-(*args,-**kwargs) | module | anchors-(^,-$) | set-operation | aggregating-data-with-functools.reduce() | range | loop-control | design-principle | thread-synchronization | using-os-and-pathlib-modules | data-type | context-manager | constructor | while-else-loop | dictionary-methods | built-in | data-structure | descriptors | class-and-instance-variable | __future__ | collections | matrix-list-comprehension | call | membership-operators-(in,-not-in) | sys-module | string-slicing | comment | dictionaries | creating-custom-modules | assignment-operators | complex-number | counter-function | built-in-function | destructor | dataframe-and-series-objects | deep-copy | numeric | attribute | decorator | oops | round | conditional-statement | comprehension | center | control-flow | python-syntax-and-structure | import-method | list-vs-tuple | working-with-temporary-files-using-tempfile | split | data-structures | function | control-flow | python_version | formatting-with-strftime | class | thread-safe-data-structures-(queue.queue) | loop-control-statements | data-type-conversions | datetime.date,-datetime.time,-datetime.datetime | regex | input | namedtuple | string-manipulation | floating-point-precision | string-method | else-statement | unit-testing | assert | sorting-and-ranking | iterator | sum() | escape-operator | operator-or | update | working-with-dates-and-times | literal-characters-and-special-characters | operand | datatype | list-slicing | multiple-inheritance | difference-between-threads-and-processes | mysql | using-lists-as-stacks | asyncio | logical-operators | while-loop | dictionary-comprehensions | creating-and-starting-threads | advanced-file-operations | dicts | heap-memory | default-mutable-argument | indexing:-loc-vs-iloc | introduction-to-threads | operator-overloading | built-in-modules | array | iterable | choice | loop | defining-functions | conversion | id-function | global | memory-management | static-method | round-function | indentation | introduction-to-python | for | integer | package-management | functions | pep | indexing | python-repl | mathematics | postfix | exponentiation | managing-directories-with-os-and-shutil | oop | encapsulation | benefit | tuple-methods | opening-files-(open()) | directory-operations | implementation | polymorphism | software-design | append | threading | __all__-attribute | python-django | math | generators | quantifiers-(*,-+,-?,-{}) | data_structure | statement | global-keyword | datetime | immutable-data-type | formal-and-actual-parameter | type_conversion | global-variable | sys | using-the-threading-module | identity-operator | random-function | variable | integers | docstring | multiprocessing | overflow | functional-programming | list-operation | error | operations | file-handling | assignment-operator | collection | application | boolean-and-non-boolean | built-in-function | input-function | string-formatting | joining-and-merging-dataframes | pseudocode | operators | frozenset | python-history | inheritance | precedence-and-associativity | precedence | generator | file_handling | inherit | syntax-error | arithmetic-operation | comparison | invalid-list | interpreter | python | version | library | syntax | bitwise | binary-operation | logical-operator | arithmetic-expression | filter-function | function-and-scope | list-methods-and-slicing | bitwise-operator | map-function | classes | using-map()-for-transformations | overriding-methods | sorting | key-value-pairs | pickling--unpickling | exception-handling | type-conversion | yield | class-and-object | mathematical-function | boolean-masking | exception | raise-statement | file-handling | turtle | using-yield-in-functions | test-discovery | feature | type-conversion-and-casting | lambda-function | operator-and | zip-function | else | keyword | expression | lambda | regular-expression | higher-order-function | format | methods | immutability | enumerate() | floats | nested-loop | string | sets | generators-in-python | slicing | intering | error-handling | fabs-function | while-loops | odd-number | virtual-environment | tuples | goto-function | tuple | objects | time-series-with-pandas | head-and-tail | lambdas | list-method | global-variable | strings | lists | version-check | introduction-to-multiprocessing | scientific-notation | factorial-function | list-comprehension | exception-handling | handling-missing-values-(fillna,-dropna) | filter | list-join | operator | list-mutation | touples | matrix | using-assertions-(assertequal,-assertraises) | with-statement | filtering-and-indexing | file | python-module | zfill-function | reading-and-writing-large-files-efficiently | random | function-argument | parsing-with-strptime | string-iteration | loops | syntaxerror | namespace | python-operators | working-with-file-paths | identity-operator | list-comprehensions | identity-operators-(is,-is-not) | error-handling | why-use-multiprocessing-over-threading?-(gil) | stack | memory | gil | while-and-for-loop | method | expand-tab | init | functional-programming | regular-expressions | multiple-except-blocks | sorted | logical-operator | encoding | int | string-concatenation | list | shallow-copy | multithreading | mutable | logical-operation | min-max-function | name-mangling | identifier | tuple-unpacking | join | lambda-functions | zip | list-indexing | min-function | iterators | math-copysign | string-method | string-methods | input-function | multiple-inheritance | installation | data-type | match | string-slicing | method-overloading | mapping-function | virtual-environment | string-formatting | reading-and-writing-files ...