Level 7 : What will be the output of the following?


list1 = [1,2,3,4,5]
print(list1[::2])

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