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