Tools_List=["Hoe","Pitchfork","Shovel"] #`list`
print(Tools_List)
Tools=input("What tools do you want? ")
print(Tools_List[Tools])
Asked
Active
Viewed 38 times
-2
-
3sorry this autism, i am bad at python – mememan Aug 17 '16 at 23:28
-
Convert input from string to int – Oleg Imanilov Aug 17 '16 at 23:29
-
cheers big man sorry for being autism – mememan Aug 17 '16 at 23:31
1 Answers
0
One can only index with one index as a time, wheres your prompt asks for 'Tools' plural. I suggest (with the int correction, and lower-case names)
tools = ["Hoe","Pitchfork","Shovel"]
print(tools)
tool = int(input("What tool do you want? "))
print(tools[tool])

Terry Jan Reedy
- 18,414
- 3
- 40
- 52