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