txt = open(target_file, 'r', encoding='utf-8').read().replace('\r', '') with open(target_file, 'wb') as f: f.write(txt.encode('utf-8'))
txt = open(target_file, 'r', encoding='utf-8').read().replace('\r', '') with open(target_file, 'wb') as f: f.write(txt.encode('utf-8'))