Level 1 : What does the following expression return?


d = {'a': 1, 'b': 2}
print(d.fromkeys(['x', 'y'], 10))

Author: SandhyaR | Tags: dictionary | 1736+ Python FAQs | Share
list-comprehension | interpreter | installation | numeric | memory-management | objects | pep | sys | random-function | parameter | decimal | precedence-and-associativity | expression | list | arithmetic-operation | software-design | global-keyword | set-operation | multiple-inheritance | application | stack | memory | error | command-line-parsing | class-and-inheritance | immutability | context-manager | implementation | encapsulation | design-principle | head-and-tail | binary-operation | condition | conditional-statement | scientific-notation | while-and-for-loop | asyncio | static-method | python-repl | bitwise-operator | def | bitwise-operator | zfill-function | comprehension | statement | odd-number | filter-function | integer | package-management | namespace | feature | exception-handling | object-attribute | split | zip | decorator | init | __init_subclass__ | string-method | syntax-error | input-function | staticmethod | type-conversion | magic-method | nested-loop | destructor | function | generators-in-python | round-function | sum-function | higher-order-function | while-else-loop | encoding | string-formatting | binary | precedence | datatype | sorted | id-function | polymorphism | name-mangling | error-handling | classes | descriptors | sys-module | global-variable | list-join | identity-operator | print-statement | mathematical-function | string-slicing | lambda-function | matrix | namedtuple | operators | int | list-slicing | copy | rollback | assignment-operator | math-copysign | iterable | data_structure | global | identity-operator | class | array | recursion | compute | mapping-function | fabs-function | constructor | counter | iterator | indexing | match | overflow | benefit | __all__-attribute | pseudocode | center | virtual-environment | string-iteration | file_handling | range | boolean-and-non-boolean | virtual-environment | operand | dictionaries | arithmetic-expression | library | version-check | keyword | oop | exception-handling | pandas | immutable-data-type | string-manipulation | swapping | syntax | method | data-type | control-flow | format | formal-and-actual-parameter | indentation | expand-tab | update | __future__ | import-method | shallow-copy | python | invalid-list | pickling-&-unpickling | numpy | basic | logical-operator | file-handling | loop-control | max-min | deep-copy | list-operation | access-modifier | factorial-function | sum() | heap-memory | data-structure | assert | multithreading | lists | lambdas | input | string-formatting | syntaxerror | control-flow | conditional-statement | dicts | python-module | operator-or | multiprocessing | async | generators | bitwise | choice | type_conversion | lambda | escape-operator | filter | complex-number | version | list-indexing | function-argument | input-function | thread | while-loop | append | mathematics | print | comparison | list-method | variable | string-method | attribute | counter-function | threading | floating-point-precision | matrix-list-comprehension | tuple | slice | touples | file-handling | mysql | tuple-unpacking | collections | sorting | data-structure | data-type | python-django | global-variable | list-vs-tuple | data-structures | functional-programming | oops | else-statement | built-in-function | python-history | operations | type-conversion | function-and-scope | string-concatenation | methods | exponentiation | list-mutation | for | built-in | gil | loop | logical-operation | class-and-object | class-and-instance-variable | set | complex | min-function | call | loops | python_version | recurssion | operator | control-statement | goto-function | regular-expression | string | regex | exception | asyncio-module | built-in-function | yield | matplotlib | enumerate() | list-comprehension | min-max-function | identifier | typeerror | operator-overloading | string-slicing | docstring | raise | operator-and | logical-operator | join | dictionary | file | map-function | postfix | datetime | collection | math | generator | slicing | return-statement | comment | inherit | random | turtle | boolean | conversion | zip-function | default-mutable-argument | frozenset | debugging | syntax-error | module | with-statement | inheritance | functions | mutable | round ...