import random
def generate_red_ball():
red_balls = list(range(1, 34))
selected_red_balls = random.sample(red_balls, 6)
selected_red_balls.sort()
return selected_red_balls
def generate_blue_ball():
blue_balls = list(range(1, 17))
selected_blue_ball = random.choice(blue_balls)
return selected_blue_ball
def generate_double_color_ball():
red_balls = generate_red_ball()
blue_ball = generate_blue_ball()
return red_balls, blue_ball
result = generate_double_color_ball()
print("双色球开奖结果:红球 {} 蓝球 {}".format(result[0], result[1]))