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