How to Determine How Many Items Exist in a Tuple in Python


In this example we will show how to determine how many items exist in a tuple in Python.

Source Code

my_tuple = ('a', 'b', 'c', 'd')

print(len(my_tuple))

Output:

4
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments