python random.choice() import random random.choice(se)随机返回序列se中的一个元素,se可以为tuple,list或str。 例如: a = [1,2,3,4] random.choice(a) 输出结果如下: 3