编码、解码
temp = "中国北京" # utf-8# 解码 需要制定原来是什么编码temp_unicode = temp.decode('utf-8')# 解码,需要指定要编成什么编码temp_gbk = temp_unicode.encode('gbk')print(temp_gbk)