Two lessons: Functions can return booleans (True/False).
Don't wrap a boolean in an if statement. If you're returning what a comparison already produces, return the comparison directly. This pattern appears constantly. When you see yourself writing if x: return True else: return False, just write return x.