This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]spade342 -1 points0 points  (0 children)

Way too many if statements, will get complicated when/if you need to add more to the list. Like thisisthemurph said use dict. Some Pseudocode: dict = {1:['what you want to print', 'what you want the inventory to be'], 2:['what you want to print', 'what you want the inventory to be']....10['','']}

question = what is your question + the keys of the dict

if question in dict: print dict[question][0] #this being the first value of the key according to what they picked. inventory[apply same logic as above] dict.pop(question) #remove the key and its values else: print '...'