s = u"abc你好def啊"n = [s[i:i+3] for i in xrange(0, len(s), 3)]print('{0!r}'.format(n))
Standard input is empty
[u'abc', u'\xe4\xbd\xa0', u'\xe5\xa5\xbd', u'def', u'\xe5\x95\x8a']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!