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