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