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