A simple return statement will "stop" or return a function, in exact terms, "return" the execution of the function to the point at which the function was called - the function is terminated without further action.
This means that you can have several places in your function where it can return. Like this:
def player(): do something here check_winner_variable = check_winner()
source share