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