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