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