Skip to content

Instantly share code, notes, and snippets.

View hanxiaomax's full-sized avatar
😜
code with love @ shanghai

Lingfeng_Ai hanxiaomax

😜
code with love @ shanghai
View GitHub Profile
@hanxiaomax
hanxiaomax / gist:942fef714311c112cafe
Created August 13, 2014 09:08
用字符串模拟一个列表,转换为Unicode然后再还原为一个列表的方法
uni=unicode('apple,orange')
print uni
print type(uni)
_str=uni.encode('utf-8')
print _str
print type(_str)
_list=list(_str.split(','))
print _list
print ','.join(_list)