Level 10 : What will be the output of the following code snippet?


dict1 = {'first' : 'sunday', 'second' : 'monday'}
dict2 = {1: 3, 2: 4}
dict1.update(dict2)
print(dict1)

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