This code here is incorrect btw. In both the cases, you are checking the same thing. Also, you should check if `owed1to2 == 0` etc. instead of `owed1to2 is None`.

I would suggest doing something like if `owed1to2 != 0:` and `owed2to1 != 0` etc. ...