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


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0