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