i have been having this error and cannot find a way to fix it here is my code (i am using python 3.7)
qustion = pyperclip.paste()
qustion = qustion.replace("×", "*")
qustion = qustion.replace("÷", "/")
list_qustion = qustion.split
op_func = ops[str(list_qustion[1])] # the line where the error occurs
answer = op_func(list_qustion[0], list_qustion[2])
print(answer)