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