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 | 1736+ Python FAQs | Share
datetime | list-operation | oop | virtual-environment | recursion | function-argument | numpy | tuple | lambda-function | data-type | polymorphism | class-and-object | bitwise-operator | matrix | indentation | min-max-function | range | regex | choice | input-function | boolean-and-non-boolean | operand | function-and-scope | complex-number | name-mangling | design-principle | zip | math-copysign | generator | operator-or | immutable-data-type | mapping-function | comparison | postfix | python-history | boolean | gil | print-statement | logical-operator | sorting | center | sum-function | slicing | counter | benefit | exponentiation | python-module | mathematical-function | data-type | swapping | generators-in-python | staticmethod | list-vs-tuple | deep-copy | conditional-statement | file | binary-operation | string-slicing | functions | indexing | identity-operator | conversion | datatype | join | threading | control-flow | error-handling | list-mutation | implementation | exception-handling | while-and-for-loop | class-and-instance-variable | array | round | mathematics | operator | list-indexing | string | thread | call | loops | string-formatting | list-comprehension | goto-function | input-function | error | command-line-parsing | pseudocode | recurssion | string-method | filter | input | slice | installation | operator-and | logical-operation | init | asyncio-module | data_structure | sum() | __all__-attribute | object-attribute | data-structures | data-structure | heap-memory | mysql | virtual-environment | debugging | immutability | import-method | loop | library | frozenset | factorial-function | touples | logical-operator | default-mutable-argument | method | format | type-conversion | python-django | comment | operator-overloading | encoding | global | global-variable | random | else-statement | lambdas | collection | pickling-&-unpickling | memory-management | head-and-tail | print | context-manager | syntax-error | syntax | expression | file-handling | global-variable | nested-loop | binary | pep | application | built-in | bitwise-operator | with-statement | string-method | classes | docstring | filter-function | decimal | escape-operator | built-in-function | random-function | python-repl | objects | id-function | decorator | oops | floating-point-precision | condition | string-slicing | fabs-function | round-function | interpreter | sys-module | identity-operator | matrix-list-comprehension | asyncio | numeric | built-in-function | assert | keyword | lists | identifier | formal-and-actual-parameter | exception | higher-order-function | dictionaries | version-check | multithreading | statement | operations | file_handling | string-manipulation | odd-number | inheritance | bitwise | control-flow | destructor | memory | type_conversion | dicts | comprehension | control-statement | map-function | invalid-list | static-method | basic | arithmetic-operation | turtle | syntaxerror | split | iterable | zip-function | generators | class-and-inheritance | syntax-error | enumerate() | class | __init_subclass__ | stack | return-statement | python | module | functional-programming | set | methods | version | match | for | async | lambda | sys | typeerror | global-keyword | zfill-function | attribute | append | collections | compute | rollback | list-comprehension | complex | expand-tab | sorted | set-operation | python_version | while-else-loop | raise | file-handling | list | list-method | scientific-notation | software-design | multiple-inheritance | operators | math | string-iteration | iterator | descriptors | list-join | type-conversion | overflow | precedence-and-associativity | max-min | function | conditional-statement | inherit | min-function | __future__ | pandas | package-management | arithmetic-expression | dictionary | constructor | integer | feature | int | regular-expression | update | matplotlib | variable | yield | namedtuple | tuple-unpacking | assignment-operator | access-modifier | magic-method | parameter | def | copy | while-loop | exception-handling | precedence | multiprocessing | list-slicing | string-formatting | namespace | loop-control | string-concatenation | encapsulation | data-structure | shallow-copy | mutable | counter-function ...