Level 1 : What is the output of the following code?


data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print(data[1 : : 2])

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