Python Tuple Length
Tuple Length
To determine how many items a tuple has, use the len()
method:
Example
Print the number of items in the tuple:
thistuple = ("apple", "banana", "cherry")
print(len(thistuple))
Try it Yourself »
To determine how many items a tuple has, use the len()
method:
Print the number of items in the tuple:
thistuple = ("apple", "banana", "cherry")
print(len(thistuple))
Try it Yourself »