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