1. 程式人生 > >python3 將字串unicode轉換為中文

python3 將字串unicode轉換為中文


>>> aa = '\\u5e7f\\u4e1c\\u7701\\u6df1\\u5733\\u5e02\\u5b9d\\u5b89\\u533a\\u77f3\\u5ca9\\u8857\\u9053\\u6c34\\u7530\\u77f3\\u9f99\\u5927\\u905326\\u53f7'
>>> aa.encode('utf-8').decode("unicode_escape")
'廣東省深圳市寶安區石巖街道水田石龍大道26號'
>>>