中英文汉字和符号 不同编码下占用字节 print(len('中'.encode('utf-8'))) print('中'.encode('utf-8')) >>3 >>b'\xe4\xb8\xad' print(len('a中国'.encode('gbk