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