Python编码转换代码

# -*- coding:utf-8 -*-

temp = '李姐'
temp_unicode = temp.decode('utf-8')

temp_gbk = temp_unicode.encode('gbk')
print temp_gbk 

  

原文地址:https://www.cnblogs.com/yigongzi/p/6377255.html