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


a=[1,2,3,4]

a.remove(2)
a.pop(1)
del a[1]

print(a)

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