Arithmetic Arranger. Help with Assertion Errors

I tested my code locally and everything works fine and the output seems to be exactly the same as the test outputs, however I get Assertion Errors saying:

E       AssertionError: Expected different output when calling "arithmetic_arranger()" with ["11 + 4", "3801 - 2999", "1 + 2", "123 + 49", "1 - 9380"]
E       assert '  11      38...   ------    ' == '  11      38...---    ------'
E         -   11      3801      1      123         1
E         +   11      3801      1      123         1    
E         ?                                         ++++
E         - +  4    - 2999    + 2    +  49    - 9380
E         + +  4    - 2999    + 2    +  49    - 9380    
E         ?                                         ++++
E         - ----    ------    ---    -----    ------...
E         
E         ...Full output truncated (3 lines hidden), use '-vv' to show

Ive trying finding a similar issue online but to no avail, would appreciate any help on the issue.
This is repl.it link if anyone wants to look at it in depth
https://replit.com/@RyanLoh2/boilerplate-arithmetic-formatter-7#arithmetic_arranger.py

I found the error, turns out I didn’t remove the white space at the end of every line :sweat_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.