Python 2.x


#-*- coding: utf-8 -*-

import random

def lottery(sayilar):
yield random.sample(sayilar,6)

sayilar = list()

for i in range(20):
sayi = int(raw_input("{}.Sayıyı girin: ".format(i+1)))
if sayi <= 49:
sayilar.append(sayi)

for rnd_no in lottery(sayilar):
print rnd_no