I have the following code:
stru = "۰۱۲۳۴۵۶۷۸۹"
strlist = stru.decode("utf-8").split()
IndexError: list index out of range
split() method by default splits on whitespace. Therefore,
strlist is a list that contains the whole string in
strlist, and one single element.
If you want a list with one element for each unicode codepoint you can do transform it into a list in different ways:
[item for item in stru.decode("utf-8")]
for character in stru.decode("utf-8"):...)