import random number1=random.randint(1,41) number2=random.randint(1,41) number3=random.randint(1,41) number4=random.randint(1,41) number5=random.randint(1,41) number6=random.randint(1,41) solve=0 if not((number1==number2 or number3 or number4 or number5 or number6) and (number2==number1 or number3 or number4 or number5 or number6) and (number3==number1 or number2 or number4 or number5 or number6) and (number4==number1 or number2 or number3 or number5 or number6) and (number5==number1 or number2 or number3 or number4 or number6) and (number6==number1 or number2 or number3 or number4 or number5)): number1=random.randint(1,41) solve=1 else: number1=random.randint(1,41) number2=random.randint(1,41) number3=random.randint(1,41) number4=random.randint(1,41) number5=random.randint(1,41) number6=random.randint(1,41) print("Lottery Numbers:",number1,number2,number3,number4,number5,number6)