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