The finished code of tic tac toe in python