Multiplikation von Tupeln in Python

Man kann Tupel ebenfalls multiplizieren, d.h. sie eine bestimmte Anzahl von Malen kopieren. Dies geschieht mit dem Operator *:

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

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

Gegeben ist das Tupel:

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

Erstellen Sie daraus das folgende Tupel:

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

Gegeben sind die Tupel:

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

Schreiben Sie Code, um das folgende Tupel zu erhalten:

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