I\'ve very recently migrated to Py 3.5. This code was working properly in Python 2.7:
with open(fname, \'rb\') as f: lines = [x.strip() for x in f.readli
You can encode your string by using .encode()
.encode()
Example:
'Hello World'.encode()