Last active
January 20, 2021 19:34
-
-
Save amirsinaa/7934452fa2acb4bd15e1c9224c0b9099 to your computer and use it in GitHub Desktop.
A simple python script to generate random phone numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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,100): | |
print('0912', random_with_N_digits(7)) |
Thanks a lot
hello guys!!!
how can i make the program to start printing with specific number starting with 6*, 7*, 8* or 9*
hello guys!!!
how can i make the program to start printing with specific number starting with 6*, 7*, 8* or
print('6',random_with_N_digits(7),'\t','7',random_with_N_digits(7),'\t','8',random_with_N_digits(7))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks buddy for this script. The applications for this is endless. However, when my app starts to make monies I shall definately donate to you! Thanks man!