Level 10 : what is output of the following code?


a=[1,2,3]
b=a
print(a is b,a==b)

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