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


a = (1,2,3,4)
a.append(a)
print(a)

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