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