""" 双色球-6个红色球(1-33)和一个蓝色球(1-16) """ from random import randint def select(n): red_balls=[x for x in range(1,34)] select_bolls=[] for _ in range(6): index = randint(0,len(red_balls)) select_bolls.append(red_balls[index]) del red_balls[index] select_bolls.sort() num=randint(0,16) select_bolls.append(num) return select_bolls def dis_play(balls): for index,ball in enumerate(balls): if index==len(balls)-1: print('|',end=' ') print('%02d' % ball,end=' ') print() def main(): n=int(input('机选几注:')) for _ in range(n): dis_play(select(n)) if __name__ == '__main__': main()