Level 10 : What is the output of the following code.


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

Author: anusha | Tags: list | 1859+ Python FAQs | Share
zip | reading-and-writing-large-files-efficiently | loop-control | matrix | module | max-min | match | string-formatting | reading:-read(),-readline(),-readlines() | sys-module | min-function | split | math | static-method | strings | math-copysign | syntax | list-method | staticmethod | recursion | namedtuple | logical-operator | sorting-and-ranking | numeric | syntax-error | multiprocessing | operator-and | set | range | string-slicing | error-handling | invalid-list | loops | choice | expand-tab | pass | goto-function | docstring | id-function | python | condition | default-mutable-argument | list-join | introduction-to-threads | overflow | logical-operators | string-concatenation | factorial-function | conditional-statement | default-arguments | python-repl | loop-control-statements | slice | mathematics | data-structures-in-python | decimal | dictionary | debugging | operator-overloading | syntaxerror | nested-loop | joining-and-merging-dataframes | objects | copy | control-flow | deep-copy | compute | datetime.date,-datetime.time,-datetime.datetime | indexing | conditional-statement | descriptors | dictionary-methods | list-comprehensions | implementation | comprehension | data-structure | data-types | counter-function | counter | set-operation | typeerror | key-value-pairs | lambda-functions | matplotlib | walking-through-directories-using-os.walk() | constructor | yield | multithreading | sum() | dictionary-comprehensions | quantifiers-(*,-+,-?,-{}) | directory-operations | random | destructor | type-conversion-and-casting | python-operators | immutable-data-type | using-assertions-(assertequal,-assertraises) | introduction-to-multiprocessing | generators | list-vs-tuple | python-django | list,-set,-and-dictionary-comprehensions | data-structures | recurssion | filtering-and-indexing | file_handling | filter-function | list-slicing | inheritance | design-principle | dicts | floating-point-precision | functional-programming | fabs-function | rollback | inherit | sum-function | operator-or | raise | string-manipulation | magic-method | datatype | handling-missing-values-(fillna,-dropna) | data-type | context-manager | def | exponentiation | complex-number | __future__ | single-inheritance | identity-operator | else | exception-handling | variable | iterator | mathematical-function | string-method | using-yield-in-functions | literal-characters-and-special-characters | print-statement | file-handling | functional-programming | method | immutability | memory | function | exception | complex | regex | thread-safe-data-structures-(queue.queue) | time-series-with-pandas | package-management | list-methods-and-slicing | raise-statement | list-indexing | odd-number | polymorphism | min-max-function | list | conversion | access-modifier | while-and-for-loop | version | unit-testing | using-the-threading-module | methods | function-argument | integer | lists | turtle | data-structure | thread-synchronization | init | string | boolean | input-function | library | using-else-and-finally | assignment-operators | built-in-modules | name-mangling | managing-directories-with-os-and-shutil | version-check | scientific-notation | iterable | string-slicing | with-statement | sorting | list-comprehension | why-use-multiprocessing-over-threading?-(gil) | virtual-environment | built-in-function | list-operation | lambda-function | function-and-scope | stack | filter | head-and-tail | application | parameter | formal-and-actual-parameter | method-overloading | while-loops | benefit | asyncio | assert | namespace | introduction-to-python | return-statement | arithmetic-expression | round | python_version | functions | aggregating-data-with-functools.reduce() | threading | sys | append | file-handling | identity-operator | anchors-(^,-$) | heap-memory | object-attribute | type_conversion | enumerate() | string-method | global | map-function | __all__-attribute | oop | attribute | random-function | pseudocode | int | identifier | input-function | sorted | type-conversion | async | using-map()-for-transformations | swapping | class-decorators | higher-order-function | global-variable | class | frozenset | software-design | matrix-list-comprehension | thread | identity-operators-(is,-is-not) | class-and-object | virtual-environment | boolean-masking | binary-operation | encoding | else-statement | generator | import-method | assignment-operator | string-iteration | operand | command-line-parsing | call | boolean-and-non-boolean | regular-expression | working-with-dates-and-times | input | arithmetic-operation | update | error | basic | join | formatting-with-strftime | mapping-function | multiple-except-blocks | pep | built-in | exception-handling | collection | bitwise-operator | operator | advanced-file-operations | print | tuple-unpacking | logical-operator | multiple-inheritance | numpy | integers | class-and-instance-variable | bitwise | pandas | working-with-file-paths | reading-and-writing-files | classes | syntax-error | center | list-comprehension | string-formatting | asyncio-module | mysql | collections | binary | type-conversion | round-function | writing:-write(),-writelines() | touples | floats | test-discovery | error-handling | python-syntax-and-structure | operations | precedence-and-associativity | while-loop | loop | file | memory-management | using-join()-and-is_alive()-methods | arbitrary-arguments-(*args,-**kwargs) | control-flow | indentation | decorator | using-os-and-pathlib-modules | logical-operation | opening-files-(open()) | overriding-methods | global-keyword | tuple-methods | lambda | statement | data-type-conversions | indexing:-loc-vs-iloc | escape-operator | precedence | installation | tuple | encapsulation | working-with-temporary-files-using-tempfile | oops | regular-expressions | keyword | conditional-statements | format | postfix | feature | multiple-inheritance | parsing-with-strptime | using-lists-as-stacks | membership-operators-(in,-not-in) | working-with-binary-files-(rb,-wb) | iterators | tuples | defining-functions | difference-between-threads-and-processes | dataframe-and-series-objects | operators | intering | comparison | expression | while-else-loop | zfill-function | generators-in-python | string-methods | comment | global-variable | sets | interpreter | lambdas | control-statement | datetime | for | python-module | gil | data-type | pickling--unpickling | shallow-copy | __init_subclass__ | array | booleans | mutable | list-mutation | bitwise-operator | built-in-function | class-and-inheritance | zip-function | creating-custom-modules | dictionaries | creating-and-starting-threads | data_structure | slicing | python-history ...