Python 2.7.13
>>> str(b'')
""
>>> bool(str(b''))
False
Python 3.6.0
>>> str(b'')
"b''"
>>> bool(str(b''))
True
My question is two-fold:
- Why does this happen?
- What is the best way to get an empty string from an empty byte string in Python 3.6.0?