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