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