Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
用字符串模拟一个列表,转换为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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.