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