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