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