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