How about using a parsing function and matching on the return value? For example:
def get_operator(token_list):
if '/' in token_list:
return '/'
...
return 'NUM' # 'NUM' means numeric token
match get_operator(c):
case '/':
i = c.index("/")
before_div, after_div = c[:i], c[i+1:]
...
case "NUM":
return c[0]