Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- texte_retour = []
- with open('La_Karavano.txt', 'r') as txt:
- line = txt.readline()
- while (line != ""):
- texte_retour.append(line)
- line = txt.readline()
- with open('new_Karavano.txt', 'w') as flow:
- longueur = len(texte_retour)
- num = 0
- while (num != longueur):
- mots = texte_retour[num].split()
- flow.write(str(num + 1) + ";" + str(len(mots)) + ";" + texte_retour[num])
- num += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement