mercredi 18 septembre 2019

Generate random Numbers in Ascending order?

How to generate random numbers in ascending order like this in a loop and append them into a list

12345 12346 12347 12348.....

tried this, this code will generate random integer, Need them in ascending order.

lists = []
for z in range(3000):
    lists.append((randint(12345,13333)))

lists_1=[str(cell) for  cell in lists_phone]
print(lists_1)





Aucun commentaire:

Enregistrer un commentaire