python模拟双色球随机一注

使用python模拟双色球随机一注

具体代码如下:

import random
a = []
for i in range(6):
    if len(a) < 7:
        b = random.randint(1, 33)
        while b in a:
            b = random.randint(1, 33)
        a.append(b)
    else:
        break
print(a)
print(random.randint(1, 16))

猜你喜欢

转载自blog.csdn.net/qq_44773537/article/details/114446115