随机生成姓名写入csv文件 import csv import random #导入random模块 f = open('csv文件/name2.csv', 'w+', encoding='gbk', newline='') csv_f = csv.writer(f) def save_data(): for i in range(1, 104): list_1 = ['于'