Level 8 : What is the output of the following program ?


mylist = [10, 20, 5, 30, 15]
print(mylist[:-1])

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