Level 3 : What is the output of this dictionary slicing operation?


d = {'a': 10, 'b': 20, 'c': 30}
print(d['a':'c'])

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