I have some text written in text files, but accidentally they were written in byte format, e.g: b'hello'. When I try to read via python as a text file, I get the output as "b'hello'", but i need "hello". I tried to convert it by:
"b'hello'".decode('utf-8')
But this gives an error as str does not have decode method. Any help regarding this will be appreciated.

b'and ending'? someting like str[2:len(str)-1]