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