You would likely have to associate your icons with something that determines your sort order (e.g., letter or number).
Then, apply Merrdydd’s 1st suggestion from the related post:
If you want to sort on multiple keys in python, you can do something like this:
sorted_on_two_columns = sorted(my_rows, key=lambda k: (k['column_1'], k['column_2']))
Here’s a clone that demonstrates sorting by letters only, then by letters and numbers: