I made a script that technically works, but doesn't give me the output that I want, which is the choice from a user-supplied list. At first, it simply returned the index of the option, not the string. I looked at this thread, and tried using random.choice()
instead of random.randint()
, which only returned the list instead.
import random
import time as t
def choose():
choices = []
question = input('What are your options? (Please enter comma separated):\n').split(',')
choices.append(question)
print(random.choice(choices))
t.sleep(5000)
choose()