### Tell us what’s happening:

I don’t think my problems are splitting correctly, but I’m not sure how to tell for sure if that’s the problem, or how to fix it. Some of my problems I think are showing up with multiple operators, and they also aren’t spacing properly. I can’t figure out how to add the spacing so its even between each problem and the numbers line up.

### Your code so far

```
def arithmetic_arranger(problems, show_answers=False):
#variables
first_number = ''
operator = ''
second_number = ''
lines = ''
if len(problems) > 5:
return 'Error: Too many problems.'
for problem in problems:
problem_array = problem.split()
first_number = problem_array[0]
operator = problem_array[1]
second_number = problem_array[2]
#error message 2 and 4 and operator solutions
if operator == '+':
if show_answers == True:
solution = int(first_number) + int(second_number)
if operator == '-':
if show_answers == True:
solution = int(first_number) - int(second_number)
else:
return "Error: Operator must be '+' or '-'."
if show_answers == False:
solution = ''
if first_number.isdigit() and second_number.isdigit():
if len(first_number) > 4:
return 'Error: Numbers cannot be more than four digits.'
if len(second_number) > 4:
return 'Error: Numbers cannot be more than four digits'
else:
return 'Error: Numbers must only contain digits.'
#formatting problem parts
top_line = 'f{first_number.rjust()}'
bottom_line = 'f{operator.ljust()} {second_number.rjust()}'
if len(first_number) > len(second_number):
if len(first_number) == 2:
lines = '----'
elif len(first_number) == 3:
lines = '-----'
elif len(first_number) == 4:
lines = '------'
if len(second_number) > len(first_number):
if len(second_number) == 2:
lines = '----'
elif len(second_number) == 3:
lines = '-----'
elif len(second_number) == 4:
lines = '------'
#formatting whole problem
whole_problem = 'f{top_line}\n{bottom_line}\n{lines}\n{solution}'
return ' '.join(whole_problem)
arithmetic_arranger(["3801 - 2", "123 + 49"])
```

### Your browser information:

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15`

### Challenge Information:

Build an Arithmetic Formatter Project - Build an Arithmetic Formatter Project