Get the length of a tuple : Tuple Length « Tuple « Python






Get the length of a tuple

Get the length of a tuple

inventory = ("a",
             "b",
             "c",
             "d")

print "You have", len(inventory), "items in your possession."

           
       








Related examples in the same category

1.A tuple with one item: a comma A tuple with one item: a comma