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