import random
l = [2, 56, 6678, 88, 6, 43]
num = 2
sub = random.sample(l, 2)

随机采样 算法