Hello, I’m looking for feedback and advice.

https://replit.com/@BiggPaully/boilerplate-arithmetic-formatter-13?v=1

specifically -

**Should I do this step before or after splitting problems-**

“”“The appropriate operators the function will accept are addition and subtraction. Multiplication and division will return an error. Other operators not mentioned in this bullet point will not need to be tested. The error returned will be: Error: Operator must be ‘+’ or ‘-’.”“”

```
def arithmetic_arranger(problems):
# defining User Data Format Requirements
# for problems that arithmetic_arranger() will accept
#
# max 5 problems can be passed to arithmetic_operator()
if len(problems) > 5:
return "Error: Too many problems."
# if not
# only + or - is accepted by arithmetic_operator()
# slicing list to access parts of problem
# to verify if operands contain only digits
# and no more than 4 digits per operand
#
# and return formatted results to user
for parts in problems:
operand1 = parts.split()[0]
operator = parts.split()[1]
operand2 = parts.split()[2]
# operands must be only digits
if (operand1.isdigit() or operand2.isdigit()) == False:
return "Error: Numbers must only contain digits."
# max 4 digits per operator
if (len(operand1) or len(operand2)) > 4:
return "Error: Numbers cannot be more than four digits."
# formatting results to return to user
# If the user supplied the correct format of problems, the conversion you return will follow these rules:
# single space between the operator and the longest of the two operands,
# the operator will be on the same line as the second operand,
# both operands will be in the same order as provided (the first will be the top one and the second will be the bottom).
# Numbers should be right-aligned.
# There should be four spaces between each problem.
# There should be dashes at the bottom of each problem. That run along the entire length of each problem individually. (The example above shows what this should look like.)
# 32 1 9999 523
# + 8 - 3801 + 9999 - 49
# ---- ------ ------ -----
# 40 -3800 19998 474
return arranged_problems
```

**Your browser information:**

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

**Challenge:** Scientific Computing with Python Projects - Arithmetic Formatter

**Link to the challenge:**