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