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