Merge Dictionaries with Same Elements in Python

If the dictionaries contain identical elements, then only one of them will remain after merging. Let's look at an example. Let's say we have the following dictionaries:

pythondct1 = {
  'a': 1,
  'b': 2,
  'c': 3
}

dct2 = {
  'c': 3,
  'e': 4,
  'f': 5
}

Let's put them together:

pythondct1.update(dct2)

Let's look at the result:

pythonprint(dct1) # {'a': 1, 'b': 2, 'c': 3, 'e': 4, 'f': 5}
Задание 1

The following code is given:

pythondct1 = {
  'z': 2,
  'w': 8,
  'f': 10
}

dct2 = {
  'x': 4,
  'y': 5,
  'z': 6
}

dct1.update(dct2)
print(dct1)

Tell me what will be output to the console.

Задание 2

The following code is given:

pythondct1 = {
  2: 'a',
  4: 'b',
  6: 'c'
}

dct2 = {
  1: 'd',
  3: 'e',
  4: 'f',
  7: 'j'
}

dct2.update(dct1)
print(dct2)

Tell me what will be output to the console.