It says: TypeError: list indices must be integers or slices, not str
This is why this code doesn't work for me:
list1 = ["unity1", "unity2", "unity3"]
choice1 = str(input("Write your option:")) #user types 1
print("Your choice is ", list1[choice1])
If list1[1]
would print "unity2", why doesn't list1[choice1]
make the same result because choice1 == 1 ?
I would like it to print "unity2". Do you know any alternative to print one element of a list based on a user choice ? Thank you