Saamvoeg van 'n tupel in 'n string in Python

Met die join-metode kan jy ook tupelelemente in 'n string saamvoeg:

pythontpl = ('a', 'b', 'c')
txt = '-'.join(tpl)

print(txt) # sal 'a-b-c' uitvoer
Задание 1

Gegewe tupel:

pythontpl = ('1', '2', '3', '4', '5')

Voeg die elemente van hierdie tupel saam in 'n string met skeiding:

python'1-2-3-4-5'
Задание 2

Gegewe tupel:

pythontpl = ('1', '2', '3', '4', '5')

Voeg die elemente van hierdie tupel saam in 'n string:

python'12345'