I am new to programming and am trying to update a pre-established list based upon user input in Python 2.5.
Here is exactly what I am trying to do:
I have various items that a user must choose from...let's use the following as an example:
item1 = [1,2,3,4]
item2 = [2,3,4,5]
I have the user choosing which item by using raw_input:
item_query = raw_input("Which item do you want?: ")
Once they have chosen their appropriate item, I want to place the appropriate item (along with the items contained in that respective list) into a blank list that will maintain that user's inventory:
user_inventory = []
Can anyone show me how to do this?
item1?1?item1?