如何在测验中多次从列表中随机选择(10次)?

时间:2015-03-14 11:51:36

标签: python-3.x

随机导入 问题=(" 4 + 2"," 4 - 2"," 3 * 3"," 3 + 2",&#34 ; 5 * 2"," 4 + 3"," 9 - 3"," 4 * 2"," 1 + 2&#34 ;," 9 - 2") question = random.choice(questions)

1 个答案:

答案 0 :(得分:0)

如果您想随机获得X威慑选项,您可以先随机更改数组的顺序,然后逐个选择。