0
What does "TypeError:choice() takes exactly 1 arguments (4 given)" mean
I'm trying to do something like print(random.choice(one, two, three, four)) where one, two, three, etc, were previously defined. Why doesn't it work? Thanks for helping!
1 Resposta
+ 2
You need to make them into a list first.
And use the list as argument to choice()
print(random.choice([one, two, three, four] ))