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