Hi . I’ve been struggling at what totally seems to be the Operator problem, while being also flagged for arrangements and solutions. Can someone explain where/how to fix it ?

Or what I should study more about? My browser looks so stressed out.

Thank you! I appreciate it!

**My code so far**

```
def arithmetic_arranger(problems, show_answer = False):
if len(problems)>5:
return "Error: Too many problems."
else:
fLine = ""
sLine = ""
thLine = ""
ansLine = ""
for i, problem in enumerate(problems):
x=problem.split()
num1 =x[0]
num2 =x[2]
op = x[1]
if op !="+" and op !="-":
return "Error: Operator musr be '+' or '-'."
else:
for digit in num1:
if digit not in ["0","1","2","3","4","5","6","7","8","9"]:
return "Error: Numbers must only contain digits."
else:
continue
for digit in num2:
if digit not in ["0","1","2","3","4","5","6","7","8","9"]:
return "Error: Numbers must only contain digits."
else:
continue
if len(num1)>4 or len(num2)>4:
return "Error: Numbers cannot be more than four digits."
elif op =="+" or op =="-":
width =max(len(num1), len(num2))+2
first = str(num1)
fLine += first.rjust(width)
sLine += str(op +" "+ num2.rjust(width-2))
thLine += str("-"*width)
arr_problems =[]
problem is problem in arr_problems
if i<len(problems)-1:
fLine +=" "
sLine +=" "
thLine +=" "
ansLine +=" "
problem = (fLine+'\n'+sLine+'\n'+thLine)
return " ".join(str(problem) for problem in arr_problems)
if show_answer== True:
if op == "+":
answer1 = int(num1)+int(num2)
ansLine += str(answer1).rjust(width)
else:
answer2 = int(num1)-int(num2)
ansLine += str(answer2).rjust(width)
problem = (fLine+'\n'+sLine+'\n'+thLine+'\n'+ansLine)
return " ".join(str(problem) for problem in arr_problems)
```

**My browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36`

.

**Challenge:** Arithmetic Formatter

**Link to the challenge:**