Level 9 : what is the output of the following code?


sampleList = [10, 20, 30, 40]
del sampleList[0:6]
print(sampleList)

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