Length of a tuple in Python
To find the length of a tuple, you should apply the len function:
pythontpl = ('a', 'b', 'c')
print(len(tpl)) # 3
Задание 1
A tuple is given:
pythontpl = ('1', 'b', '3', 'd', '5')
Find its length.
Задание 2
A tuple is given:
pythontpl = (1, 2, 3)
Print the number of elements in this tuple.