0

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)

1 Answer 1

2

qustion.split is a function not a list of values. What I guess you meant is -

list_qustion = qustion.split() 

or possibly with the delimiter -

list_qustion = qustion.split('.') 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.