Jan-10-2018, 04:50 AM
I fixed your BBCODE tags above, use python icon, not quotes for code.
import os import sys try: with open('text.txt', 'r') as f, open('text_vystup.txt', 'w') as f1: for line in f: line = line.strip() line = '{}{}\n'.format(line, len(line)) f1.write(line) except IOError: print('vstupni soubor nenalezen!')