0
Je suis this tutorial here pour séparer et écrire un fichier texte délimité, mais seulement obtenir un fichier en sortie. Est-ce un problème python2 -> 3? Aidez-moi, s'il vous plaît.Séparer et écrire des fichiers uniques à partir d'un texte délimité
filename = ('file path')
with open(filename) as Input:
op = ''
start = 0
count = 1
for x in Input.read().split("\n"):
if (x == 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'):
if (start == 1):
with open(str(count) + '.txt', 'w') as Output:
Output.write(op)
Output.close()
op = ''
count = + 1
else:
start = 1
Input.close()