May-14-2020, 01:45 PM
Thanks for your help @deanhystad . I had come across the try/except set but I'd assumed as it hadn't been covered in the course I'm working through that I wouldn't need it. I've posted my final, working function below and marked solved.
def move_accept(z): while True: try: print("Enter the coordinates: ") coords_ = input() coords_ = coords_.split() if not ((0 < int(coords_[0]) <= 3) and (0 < int(coords_[1]) <= 3)): print("Coordinates should be from 1 to 3!") elif not valid_play_finder(int(coords_[0]), int(coords_[1]), z): print("This cell is occupied! Choose another one!") else: return coords_ except ValueError: print("You should enter numbers!")