Using python generate random names and address to csv format
Question:
Using python how do i generate randon names in the format of random email, first name , last name, address, city, state, zip, country(USA only)
Answers:
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='')
Using python how do i generate randon names in the format of random email, first name , last name, address, city, state, zip, country(USA only)
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='')