human
sort by a token in string.
assistant
Here is a Python program to sort by a token in string

string = "This is a string"
token = "is"

# Calling the function
print((sort_by_token(string, token)))

#Example Output
# ['T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 's', 't', 'r', 'i', 'n', 'g']

#Remember to inspect code for bugs.