import random answer="y" while answer !="n": LOT = random.sample(range( 1, 40 ), 6) print("lotery numbers",LOT) answer=input("")