"""
3. 完成彩票36选7的功能。从36个数中随机的产生7个数。最终获取到7个不重复的数据作为最终的开奖结果。
随机数:
from random import randint
randint(1, 20) # 0-20的随机数
"""
from random import randint
s = set()
while len(s) < 7:
r = randint(1, 36)
s.add(r)
print(s)
"""
3. 完成彩票36选7的功能。从36个数中随机的产生7个数。最终获取到7个不重复的数据作为最终的开奖结果。
随机数:
from random import randint
randint(1, 20) # 0-20的随机数
"""
from random import randint
s = set()
while len(s) < 7:
r = randint(1, 36)
s.add(r)
print(s)