Display one item through an index : Tuple Index : Tuple PYTHON examples


PYTHON examples » Tuple » Tuple Index »

 

Display one item through an index





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


index = int(raw_input("nEnter the index number for an item in inventory: "))
print "At index", index, "is", inventory[index]


           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Tuple
» Tuple Index