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