使用python random模块的sample函数从列表中随机选择一组元素import random list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] slice = random.sample(list, 5) #从list中随机 ...
確定! 回上一頁