get the player' actionwhile truekeep asking until the player enters valid action print(print newline print('enter moveor resetnewundooriginalor quit:'print('(for examplea move looks like " )'action input(''upper(strip(if len(action and action[ in (' '' '' '' '' ')player entered valid action break if len(action split()= spacenumber action split(if len(space! continue columnrow space if column not in list('abcdefghi')print('there is no column'columncontinue if not row isdecimal(or not ( <int(row< )print('there is no row'rowcontinue if not ( <int(number< )print('select number from to not 'numbercontinue break player entered valid move print(print newline if action startswith(' ')reset the gridgrid resetgrid(continue if action startswith(' ')get new puzzlegrid sudokugrid(random choice(puzzles)continue if action startswith(' ')undo the last movegrid undo(continue if action startswith(' ')view the original numbersoriginalgrid sudokugrid(grid originalsetupprint('the original grid looked like this:'originalgrid display(input('press enter to continue 'if action startswith(' ')sudoku puzzle