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