f=open(r'C:\Users\X-130\Desktop\接口测试\2.txt','w')#写,清空 ('username,password') for i in range(1,10001): f.write(f'test{i},{123456}\n') 使用py注册10000个用户的脚本