Modifying Elements in Python

As you already know, a tuple is an immutable data type. If we try to access its element by index and assign it a different value, we will get an error:

pythontpl = ('a', 'b', 'c')
tpl[0] = '!'

print(tpl) # will display an error
Задание 1

The following code is given:

pythontpl = ('ab', 'cd', 'ef')
print(tpl[1])

Tell me what will be output to the console.

Задание 2

The following code is given:

pythontpl = (4, 6, 8, 10)
res = tpl[-1] + tpl[0]
tpl[1] = res

print(res)

Tell me what will be output to the console.