How would I go about using a user input to refer to a list, and then continuing to use this user input to refer to the list.
For example:
list1 = [6,23,9]
list2 = ["book","tree","car"]
getlist = input("Enter list: ")
print(getlist[0])
This code will just print the first letter of the input, but how would I make it print the first index of the inputted list. For example if I input list2, how will I get the input 'book' rather than 'l'. Many thanks.