sock.send(('hello,%s'%data.decode('utf-8').encode('utf-8'))) 应该这样吧... sock.send((b'hello,%s'%data.decode('utf-8').encode('utf-8')))
否则会报错。
两个我都试了一下,原文是没错的,下面的会报错
Sign in to make a reply
zL丶_44830
sock.send(('hello,%s'%data.decode('utf-8').encode('utf-8'))) 应该这样吧... sock.send((b'hello,%s'%data.decode('utf-8').encode('utf-8')))
否则会报错。