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