Level 9 : What is the output of the following code?


a = [1,2,3]
b = a
print(a is b, a==b)

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