Multiplying Tuples in Python

We can also multiply tuples, i.e. copy them a certain number of times. This is done using the operator *:

pythontpl = ('a', 'b')
res = tpl * 2

print(res) # ('a', 'b', 'a', 'b')
Задание 1

A tuple is given:

pythontpl1 = ('1', '2', '3')

Create the following tuple from it:

pythontpl2 = ('1', '2', '3', '1', '2', '3', '1', '2', '3')
Задание 2

The following tuples are given:

pythontpl1 = ('a', 'b')
tpl2 = (1, 2)

Write code to get the following tuple:

pythontpl3 = ('a', 'b', 'a', 'b', 1, 2)