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