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