If you have a return statement with a complex expression, you don’t have a chance to print the return value before returning. Again, you can use a temporary variable. For example, instead of:
you could write:
count = self.hands[i].removeMatches()return count
Now you have the opportunity to display the value of count before returning.