Python程式碼實現雙色球原理

youngzero發表於2017-12-05
import random
print("紅球")
list1 = []
while True:
    a= random.randint(1,34)
    if a not in list1:
        list1.append(a)
        if len(list1) == 6:
            print(list1)
            break
print("==========================")
print("藍球")
b = random.randint(1,17)
print(b)

相關文章