I want to print information about a randomly selected item. I am doing a project in class that needs a price and information about something that you buy from a store, but I can't figure that out. Sample code looks like this
import random
def test():
items = ['thing', 'item']
thing_info = 'Price is 4, gives you stuffs'
item1 = random.choice(items)
print item1, item1_info
Aucun commentaire:
Enregistrer un commentaire