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