[
["德阳","510600","104.404417","31.133116"],
["阿尔山","152202","119.950654","47.183053"]
]
##文件创建的目前同...python文件的目录
for d in params:
file = '模板创建文件-'+d[0]+'.txt'
shutil.copyfile('模板文件.txt', file)...if os.path.exists('模板创建文件-'+d[0]+'.txt'):
print(file+'文件复制成功!')...with open(file, "w", encoding="utf-8") as f:
f.write(file_data)
print(file+'文件创建成功!')...3.生成后的文件