#!/usr/bin/python import whrandom tld = (".com", ".org", ".net", ".edu", ".gov") for i in range(2000): username_length = whrandom.randint(7,10) domain_length = whrandom.randint(7,10) username = "" domain = "" for j in range(username_length): l = whrandom.randint(0,25) + ord('a') username = username + chr(l) for j in range(domain_length): l = whrandom.randint(0,25) + ord('a') domain = domain + chr(l) tld_choice = whrandom.randint(0, len(tld) - 1) email = username + "@" + domain + tld[tld_choice] print """%s""" % (email, email)