有一个数据list of dict如下

a = [

]

写入到本地一个txt文件,内容格式如下:

yoyo1,123456

yoyo2,123456

yoyo3,123456 

 

python随笔:将列表中得字典写入到txt文件中

 

 知识点:

with open('文件地址',‘w+’):as f:

  f.write()

写入,w+读写

f'{k},{v}'  写入文件 ,格式化

相关文章:

  • 2022-12-23
  • 2021-10-27
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2021-04-29
  • 2022-01-06
猜你喜欢
  • 2021-05-19
  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案