Python 3 how to convert a list of bytes objects to a list of strings?

Marco Sulla Marco.Sulla.Python at gmail.com
Thu Aug 27 17:54:29 EDT 2020


Are you sure you want `str()`?

>>> str(b'aaa')
"b'aaa'"

Probably you want:

map(lambda x: x.decode(), bbb)


More information about the Python-list mailing list