我想创建一个包含多个用户的 csvfile,同时使用他们的姓氏为这些用户创建电子邮件地址。我为此使用python,但无法在列表中创建电子邮件地址。我的脚本在下面,我错过了什么?
import csv
First_Name = ["Test"]
Last_Name = ["User%d" % i for i in range (1,10)]
Email_Address = 'Last_Name' [("@myemail.com")]
Password = ["Password1"]
# open a file for writing.
csv_out = open('mycsv.csv', 'wb')
# create the csv writer object.
mywriter = csv.writer(csv_out)
# all rows at once.
rows =zip(Email_Address, Password, First_Name, Last_Name,)
mywriter.writerows(rows)
csv_out.close()