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