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