Week 5-cOMMENTING AND ERROE HANDLING

Dear Team,

Please refer to the below link…Please refer to File handling -Read–02-05-2020 (Header)…I have uploaded the file For Padhai.txt but am unable to see any output. Please suggest.

https://colab.research.google.com/drive/1Tmn9hfXuAMGnHJ__KihHHBR4tHjcYysY

Thanks & Regards,
Purvi Mnaghi

Hi,
While opening the file please try

f = open("file.txt", 'rb')
for line in f:
    print(line.decode(errors='ignore'))

Let me know if the error gets resolved with this.

Dear Ishvinder,

Yes it got resolved. Thanks a ton.

Thanks & Regards,
Purvi Manghi