0
This is working code.得到错误,而在UTF8编码格式STR
line = 'line'
another_line = 'new ' + line
another_line.encode('utf-8')
output
b'new line'
现在,我试图找出为什么我收到错误的下面的代码在python3 VS我得到连接字符串在python2中?
line = 'line'
'new '+line.encode('utf-8')
TypeError: Can't convert 'bytes' object to str implicitly