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