Tell us what’s happening:
So I can see that the first line is off by 2 spaces, but subtracting that from the spacing or maxLen doesn’t seem to change anything, Am I overlooking something? is the formatting code just comletely wrong? I always seem to get that excess spacing. Thanks for any help!
You have some logical and indentation problems (in python is essential to correctly indent your code) :
You should be checking that the numbers are greater than 4 (not greater or equal).
On the last lines, where you create the arranged_problems, it’s indented to be inside the loop, hence you’re returning after the first problem.
You have a problem with one regex. This is the output of the result of calling your function: 32<re.Match object; span=(3, 4), match='+'>698-----32<re.Match object; span=(3, 4), match='+'>698, which is wrong.