Level 10 : What is the output of d.items() after execution?


d = {'x': 5, 'y': 10}
d = {key.upper(): value*2 for key, value in d.items()}

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