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