Level 10 : what is the output of the following code?


sampleList = [10, 20, 30, 40]
del sampleList[0:6]
print(sampleList)

Author: Pavan | Tags: list-operation | 1736+ Python FAQs | Share
file-handling | mathematics | syntaxerror | logical-operator | def | string-formatting | bitwise-operator | expression | lambda | data-structure | file | design-principle | expand-tab | bitwise-operator | functional-programming | string-method | class | datetime | math | exception | zip | classes | generators | loop | error | frozenset | dictionaries | append | while-loop | list-comprehension | matplotlib | global-variable | goto-function | type_conversion | string-concatenation | parameter | turtle | typeerror | id-function | module | descriptors | polymorphism | round-function | binary-operation | math-copysign | inheritance | list-operation | while-else-loop | call | object-attribute | lambdas | with-statement | file-handling | input-function | function-argument | while-and-for-loop | name-mangling | variable | return-statement | bitwise | built-in-function | namedtuple | python-history | gil | conversion | comparison | input-function | control-flow | feature | choice | type-conversion | indentation | yield | map-function | objects | class-and-instance-variable | sys | control-flow | syntax-error | multiple-inheritance | pandas | static-method | sorting | generator | list-comprehension | precedence | memory | slice | conditional-statement | comprehension | tuple-unpacking | input | matrix | asyncio | python-module | operators | list-join | logical-operator | else-statement | binary | min-function | comment | arithmetic-operation | rollback | stack | copy | destructor | boolean | __init_subclass__ | asyncio-module | pep | data-structures | operations | oop | operator | class-and-object | complex-number | operator-overloading | multithreading | function | exception-handling | python_version | functions | scientific-notation | fabs-function | tuple | method | interpreter | immutability | print-statement | filter | syntax | magic-method | namespace | postfix | string-slicing | format | enumerate() | recursion | heap-memory | identity-operator | operator-and | immutable-data-type | iterable | boolean-and-non-boolean | benefit | compute | numeric | attribute | keyword | random-function | global-keyword | nested-loop | global | application | oops | built-in | formal-and-actual-parameter | control-statement | logical-operation | factorial-function | string-manipulation | random | invalid-list | list-mutation | odd-number | software-design | arithmetic-expression | head-and-tail | virtual-environment | shallow-copy | array | identifier | range | indexing | list-method | collections | string-iteration | version-check | multiprocessing | int | data-type | list-slicing | python | numpy | docstring | built-in-function | for | package-management | mysql | loop-control | __all__-attribute | round | __future__ | operator-or | list | init | command-line-parsing | data-structure | dictionary | zfill-function | data_structure | precedence-and-associativity | collection | function-and-scope | escape-operator | complex | syntax-error | set | pseudocode | lists | global-variable | regular-expression | join | string-slicing | data-type | string-formatting | basic | matrix-list-comprehension | max-min | touples | statement | sys-module | counter | operand | floating-point-precision | sorted | identity-operator | mutable | constructor | counter-function | inherit | staticmethod | import-method | datatype | default-mutable-argument | thread | python-repl | regex | list-indexing | context-manager | pickling-&-unpickling | list-vs-tuple | center | swapping | split | recurssion | higher-order-function | overflow | dicts | type-conversion | decorator | file_handling | virtual-environment | update | decimal | conditional-statement | library | filter-function | set-operation | encapsulation | match | sum-function | assignment-operator | string | assert | exponentiation | methods | iterator | access-modifier | encoding | print | threading | raise | class-and-inheritance | deep-copy | debugging | mapping-function | slicing | string-method | condition | generators-in-python | installation | loops | error-handling | min-max-function | async | lambda-function | sum() | python-django | integer | mathematical-function | zip-function | implementation | version | memory-management | exception-handling ...