May-07-2018, 12:27 PM
files = ['ctrlptdata_0', 'ctrlptdata_1', 'ctrlptdata_2', 'ctrlptdata_3'] for num, filename in enumerate(files): with open(filename, 'w') as fp: fp.write(num)
How to open and write into several files
|
|
Messages In This Thread |
How to open and write into several files - by kazimahmet - May-07-2018, 12:09 PM
RE: How to open and write into several files - by Larz60+ - May-07-2018, 12:27 PM
RE: How to open and write into several files - by kazimahmet - May-07-2018, 01:06 PM
RE: How to open and write into several files - by wavic - May-07-2018, 02:08 PM
|