Python:如何处理多个打开文件的嵌套语句

问题描述

我可以说需要同时打开和工作10个文件

files  = ['example1','example2','example3',... 'example10']

目前我正在这样做

with open('example1','w') as example1:
    
    .
      .
        .

        with open('example10','w') as example10:
            # working with all files the same time

有更好的方法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)