Skip to content

Instantly share code, notes, and snippets.

@kmerenkov
Created February 7, 2011 15:04
Show Gist options
  • Save kmerenkov/814495 to your computer and use it in GitHub Desktop.
Save kmerenkov/814495 to your computer and use it in GitHub Desktop.
Returns random phone number
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