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