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