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