Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def email_templates():
- f_options = ["first", "f_ini"]
- m_options = ["middle", "m_ini"]
- l_options = ["last", "l_ini"]
- sep_options = ['', '.', '_', '-']
- sep_options2 = sep_options
- all_possible_emails = dict()
- for f_op in f_options:
- for m_op in m_options:
- for l_op in l_options:
- stuff = [f_op, m_op, l_op]
- for L in range(1, len(stuff)+1):
- for subset in itertools.permutations(stuff, L):
- #print subset
- if len(subset) == 1:
- tmp = email_formater(subset)
- all_possible_emails[tmp] = tmp
- elif len(subset) == 2:
- for sep_op in sep_options:
- tmp = email_formater([subset[0], sep_op, subset[1]])
- all_possible_emails[tmp] = tmp
- elif len(subset) == 3:
- for sep_op in sep_options:
- for sep_op2 in sep_options2:
- tmp = email_formater([subset[0], sep_op, subset[1], sep_op2, subset[2]])
- all_possible_emails[tmp] = tmp
- return all_possible_emails
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement