Created
April 12, 2021 12:42
-
-
Save tuck1s/03a52e1bb77fb576f923dff77e7d81a9 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
# External dependencies: https://github.com/treyhunner/names | |
import random, names | |
count_default = 10 # Default length of list | |
def random_n_digits(n): | |
s = '' | |
for i in range(n): | |
s += random.choice('0123456789') | |
return s | |
# Need to treat ensureUnique only with mutating list methods such as 'add', so the updated value is returned to the calling function | |
def random_recip(domain): | |
return names.get_first_name().lower() + '.' + names.get_last_name().lower() + random_n_digits(3) + '@' + domain | |
# ----------------------------------------------------------------------------------------- | |
# Main code | |
# ----------------------------------------------------------------------------------------- | |
for i in range(count_default): | |
print(random_recip('t-online.de')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment