I am using the following code form sorting:
letters = '세븐일레븐'
old = [('세븐', 8), ('븐', 2), ('일', 5), ('레', 4)]
new = sorted(old, key=lambda x: letters.index(x[0]))
For non-latin characters, the output is the same as the input:
[('세븐', 8), ('븐', 2), ('일', 5), ('레', 4)]
What I'm expecting is:
[('세븐', 8), ('일', 5), ('레', 4), ('븐', 2)]