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