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