Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- def esta_na_lista(l,n):
- for item in l:
- if(item == n):
- return True
- return False
- L = []
- i = 0
- while i < 500:
- numero = randint(100000,599999)
- while esta_na_lista(L,numero):
- numero = randint(100000,599999)
- L.append(numero)
- for item in L:
- print(item)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement