List: display one item through an index

inventory = ["sword", "armor", "shield", "healing potion"]
index = int(raw_input("\nEnter the index number for an item in inventory: "))
print "At index", index, "is", inventory[index]
Related examples in the same category