python random email generator

Solutions on MaxInterview for python random email generator by the best coders in the world

showing results for - "python random email generator"
Clara
01 Nov 2016
1Try the following:
2
3import random
4import string
5
6def random_char(y):
7       return ''.join(random.choice(string.ascii_letters) for x in range(y))
8
9print (random_char(7)+"@gmail.com")
10you can use string.ascii_lowercase if you only want lower case letters