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