Level 10 : What is the output of the following code?


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

Author: PravallikaG | Tags: list | 1736+ Python FAQs | Share
else-statement | sys | exception | higher-order-function | precedence-and-associativity | immutable-data-type | default-mutable-argument | error | type-conversion | attribute | module | call | list-method | dictionary | python-repl | assert | memory | object-attribute | format | built-in | return-statement | operator-and | file_handling | loops | frozenset | method | invalid-list | operations | counter-function | input | objects | python-django | tuple-unpacking | parameter | turtle | control-statement | generators | list-vs-tuple | python-history | operator-overloading | while-else-loop | string-manipulation | heap-memory | virtual-environment | string-method | math-copysign | min-function | decorator | def | constructor | condition | statement | import-method | magic-method | feature | head-and-tail | matplotlib | raise | string-iteration | overflow | syntaxerror | round-function | virtual-environment | sum() | descriptors | generators-in-python | pseudocode | conditional-statement | function | scientific-notation | built-in-function | slice | binary | sum-function | split | exponentiation | conversion | append | mutable | binary-operation | range | encapsulation | numpy | iterable | data-structures | context-manager | global-variable | tuple | expand-tab | dictionaries | stack | methods | static-method | library | max-min | immutability | control-flow | exception-handling | collections | design-principle | built-in-function | indentation | function-argument | multiple-inheritance | loop-control | filter-function | mysql | lambda | recurssion | math | installation | typeerror | list-operation | class-and-object | destructor | formal-and-actual-parameter | inherit | string-formatting | pep | collection | docstring | generator | operator | loop | __future__ | regular-expression | type_conversion | comprehension | boolean-and-non-boolean | int | escape-operator | gil | basic | operators | print | comparison | min-max-function | application | zfill-function | operand | functional-programming | command-line-parsing | name-mangling | threading | decimal | identity-operator | data-type | string-slicing | python | global-variable | list-join | zip | id-function | matrix-list-comprehension | boolean | postfix | asyncio-module | comment | string-method | logical-operator | python_version | oop | list-comprehension | input-function | polymorphism | filter | nested-loop | inheritance | array | sorting | slicing | shallow-copy | mathematics | deep-copy | floating-point-precision | logical-operation | odd-number | string | set | interpreter | goto-function | operator-or | string-concatenation | factorial-function | list-indexing | round | set-operation | mapping-function | debugging | package-management | class | for | multithreading | encoding | classes | touples | namespace | regex | sys-module | type-conversion | bitwise-operator | iterator | conditional-statement | multiprocessing | datatype | identifier | bitwise | version | global-keyword | datetime | asyncio | match | fabs-function | oops | namedtuple | memory-management | with-statement | control-flow | lists | syntax-error | arithmetic-operation | enumerate() | exception-handling | pandas | numeric | while-loop | integer | list | input-function | identity-operator | class-and-instance-variable | print-statement | string-formatting | logical-operator | map-function | bitwise-operator | __all__-attribute | function-and-scope | data-structure | lambdas | software-design | async | zip-function | random | file-handling | recursion | list-mutation | compute | functions | mathematical-function | data-structure | random-function | syntax-error | global | counter | syntax | complex-number | lambda-function | file-handling | init | precedence | dicts | while-and-for-loop | data_structure | implementation | copy | thread | file | join | keyword | pickling-&-unpickling | swapping | complex | list-comprehension | python-module | indexing | list-slicing | variable | benefit | error-handling | update | expression | rollback | yield | class-and-inheritance | assignment-operator | arithmetic-expression | version-check | staticmethod | string-slicing | __init_subclass__ | data-type | choice | sorted | center | matrix | access-modifier ...