+ 1
How to pick a random value from a list
2 ответов
+ 11
import random
print (range(10)[random.randint(0, 10)])
or, if you have the list named list1
import random
print (list1[random.randint(0, 10)])
+ 2
import random
print(random.choice(['a','b','c']))