Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def generator_loto_stevil():
- loto_stevila = []
- print " "
- print "Pozdravljeni! To je generator loto stevilk!"
- print " "
- st_vnos = int(raw_input("Koliko stevil zelite zgenerirati?:"))
- while True:
- rng_st = random.randint(1, 39)
- if (len(loto_stevila) + 1) > st_vnos:
- break
- elif rng_st not in loto_stevila:
- loto_stevila.append(rng_st)
- else:
- return True
- print loto_stevila
- generator_loto_stevil()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement