lundi 15 février 2021

How to save result in txt file after number has been generated

How to save result in txt file after number has been generated?

from random import randint

def random_with_N_digits(n):
    range_start = 10**(n-1)
    range_end = (10**n)-1
    return randint(range_start, range_end)

for mciNumbers in range(0,1000):
    print('+12129', random_with_N_digits(6))



Aucun commentaire:

Enregistrer un commentaire