Tic tac toe begginers project
def rev_play(moves, place): """ Docstring Author: Ache Description: Verifies if the place where the user is marking it's already in use Input: It recieves the list made from the plays and the place on the borard where the player is making the move Output: If the place where the player maker is already in use it will ask again to make chose another place iff it's not in use it'll return the place where the user marked Version:1.0 """ while moves[place] == 'O' or moves[place] == 'X': place = (int(input ('The place is already in use, choose another spot on the board: '))) else: break return place if I get rd of the else, break it works but it prints twice when my awful logic says it should be printing only once, why is it happening? Also, in this case with the else it's giving me a "SyntaxError: 'break' outside loop" why? As far as i undesrtand i'm using the correct sintax, ain't I?