Hello, I am trying to do the first project for a python course and it’s not going very well. I need a way to split the mathematical expressions by the operands but .split("+") only splits them by the + sign and I need a way to split them by + when there is a +, and by - when there is a -
def arithmetic_arranger(problems):
y = list()
for x in problems:
y.append(x.strip().split("[-+]?"))
print(y)
print(arithmetic_arranger(["32 + 698", "3801 - 2", "45 + 43", "123 + 49"]))