```
if res == 0:
    return True
else:
    return False
```
would probably have been better as just `return res == 0`.