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