import codecs

with codecs.open("Premchand.txt", 'r', encoding='utf-8', errors='ignore') as fdata:
    with open("premchandconverted.txt", 'w') as towel:
        towel.writelines(fdata.readlines())
76474555a95730f33b7556c8b9a21c0cb7293646
<mask token>

<mask token>
with codecs.open('Premchand.txt', 'r', encoding='utf-8', errors='ignore'
    ) as fdata:
    with open('premchandconverted.txt', 'w') as towel:
        towel.writelines(fdata.readlines())

import codecs
with codecs.open('Premchand.txt', 'r', encoding='utf-8', errors='ignore'
    ) as fdata:
    with open('premchandconverted.txt', 'w') as towel:
        towel.writelines(fdata.readlines())

import codecs

with codecs.open("Premchand.txt", 'r', encoding='utf-8', errors='ignore') as fdata:
    with open("premchandconverted.txt", 'w') as towel:
        towel.writelines(fdata.readlines())