[Solved] Python split unicode characters and words

[ad_1]

I’ll assume that your string is always of the form "<emoticon><alphabets>". I’ll then splice the string.

# Count number of alphabets first
num = [c.isalpha() for c in string].count(True)
# Splice string based on the result
s1 = string[:-num]
s2 = string[-num:]

5

[ad_2]

solved Python split unicode characters and words