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