data = [[], [], []]
# solution = []
for problem in problems:
elements = problem.split(' ')
print(elements)
if len(elements[0]) | len(elements[2]) > 4:
print('Error: Numbers cannot be more than four digits.')
break
elif len(elements[2]) >= len(elements[0]):
second = f'{elements[1]} {elements[2]}'
else:
second = f'{elements[1]}{" " * (len(elements[0]) - 1)}{elements[2]}'
print(second)
arithmetic_arranger(["3 / 855", "3801 - 2", "45 + 43", "123 + 49"])```
output:
```['3', '/', '855']
['3801', '-', '2']
Error: Numbers cannot be more than four digits.
the output is giving me the error print in the pfirst part of the if statement. Even though the len of the third part of the parameter isnt > 4 its still outputing the error statement and athan the break
What I want to do is to go through all the parameter and output it as like the first two
.........like this >>>>>>>>>>>>>>> ['3', '/', '855'] ['3801', '-', '2']