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