Level 9 : What is the output?


class A:
    pass

a = A()
b = A()
print(a == b, a is b)

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