Created
February 7, 2011 15:04
-
-
Save kmerenkov/814495 to your computer and use it in GitHub Desktop.
Returns random phone number
This file contains 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
import random | |
from itertools import islice | |
def dev_urandom(): | |
while True: | |
yield random.randint(0, 9) | |
def random_phone_number(): | |
return '+7' + "".join(map(str, islice(dev_urandom(), 0, 10))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment