Mega Code Archive

 
Categories / Python / Tuple
 

Get the length of a tuple

inventory = ("a",              "b",              "c",              "d") print "You have", len(inventory), "items in your possession."