> What is the best way to split a unicode string in its characters? > Specifically, having this unicode chinese string > > u'\u8C01\u4ECA\u5929\u7A7F\u4EC0\u4E48 > > I want to either split all its characters: > [\u8C01,\u4ECA,\u5929,\u7A7F,\u4EC0,\u4E48] >
>>> s = u'\u8C01\u4ECA\u5929\u7A7F\u4EC0\u4E48' >>> list(s) [u'\u8c01', u'\u4eca', u'\u5929', u'\u7a7f', u'\u4ec0', u'\u4e48'] >>> What seemed to be the problem? Or am I missing something? Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor