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 »


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.