python 列表中随机抽取多个数

方法一:
[random.randint(0,100) for _ in range(2)]
输出: [34, 44]

方法二:
list中随机去除K个数
list=[1,2.3,......]
random.sample(list, k)
原文地址:https://www.cnblogs.com/tsgxj/p/13827617.html