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