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