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