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