[Solved] Using python generate randon names and address to csv format [closed]


To generate random names you will need to have a database of names. However, if you can pass off any combination of letters as names then you can achieve this using random.choice. Refer below code which prints out 15 names and the length of names is between 3 and 25 characters. You can extend the same logic for random emails.

import random
letters = "abcdefghijklmnopqrstuvwxyz"
random.choice(letters)

population = 15

for a in range(population):
    print(" ")
    for b in range(random.randint(3,25)):
        print(random.choice(letters), end='')

1

solved Using python generate randon names and address to csv format [closed]