Python -tupellengte
Tupellengte
len()
Gebruik de methode om te bepalen hoeveel items een tuple heeft :
Voorbeeld
Druk het aantal items in de tupel af:
thistuple = ("apple", "banana", "cherry")
print(len(thistuple))
len()
Gebruik de methode om te bepalen hoeveel items een tuple heeft :
Druk het aantal items in de tupel af:
thistuple = ("apple", "banana", "cherry")
print(len(thistuple))