original_docstring: 
  	Refactor this horrendous function. Also, checks to see if either player
  	X or player O has won (because Automate the Boring Stuff stopped at this
  	point in coding the game).
  
  	:param print_board: Displays board, X, and O positions to player(s)
  	:param ttt_board: Argument passed into print_board w/ position keys/values
  	:return: None, sys.exit() if is_winner == True
  	
docstring: Refactor this horrendous function. Also, checks to see if either player
  X or player O has won (because Automate the Boring Stuff stopped at this
  point in coding the game).
docstring_tokens: Refactor this horrendous function . Also checks to see if either player X or player O has won ( because Automate the Boring Stuff stopped at this point in coding the game ) .
code: def check_win(print_board, ttt_board):
  	"""
  	Refactor this horrendous function. Also, checks to see if either player
  	X or player O has won (because Automate the Boring Stuff stopped at this
  	point in coding the game).
  
  	:param print_board: Displays board, X, and O positions to player(s)
  	:param ttt_board: Argument passed into print_board w/ position keys/values
  	:return: None, sys.exit() if is_winner == True
  	"""
  	is_winner = False
  	player = ''
  
  	def winner(player):
  		winner_print = [
  			"* * * * * * * * * * *",
  			"* * * * * * * * * * *",
  			f"   Player {player} wins!",
  			"* * * * * * * * * * *",
  			"* * * * * * * * * * *"
  		]
  		for line in winner_print:
  			time.sleep(.5)
  			print(line)
  		sys.exit()
  
  	# check X
  	if ttt_board['top-L'] == 'X' and ttt_board['top-M'] == 'X' and ttt_board[
  		'top-R'] == 'X':
  		player = 'X'
  		is_winner = True
  	if ttt_board['mid-L'] == 'X' and ttt_board['mid-M'] == 'X' and ttt_board[
  		'mid-R'] == 'X':
  		player = 'X'
  		is_winner = True
  	if ttt_board['low-L'] == 'X' and ttt_board['low-M'] == 'X' and ttt_board[
  		'low-R'] == 'X':
  		player = 'X'
  		is_winner = True
  	if ttt_board['top-L'] == 'X' and ttt_board['mid-L'] == 'X' and ttt_board[
  		'low-L'] == 'X':
  		player = 'X'
  		is_winner = True
  	if ttt_board['top-M'] == 'X' and ttt_board['mid-M'] == 'X' and ttt_board[
  		'low-M'] == 'X':
  		player = 'X'
  		is_winner = True
  	if ttt_board['top-R'] == 'X' and ttt_board['mid-R'] == 'X' and ttt_board[
  		'low-R'] == 'X':
  		player = 'X'
  		is_winner = True
  	if ttt_board['top-L'] == 'X' and ttt_board['mid-M'] == 'X' and ttt_board[
  		'low-R'] == 'X':
  		player = 'X'
  		is_winner = True
  	if ttt_board['top-R'] == 'X' and ttt_board['mid-M'] == 'X' and ttt_board[
  		'low-L'] == 'X':
  		player = 'X'
  		is_winner = True
  
  	# check O
  	if ttt_board['top-L'] == 'O' and ttt_board['top-M'] == 'O' and ttt_board[
  		'top-R'] == 'O':
  		player = 'O'
  		is_winner = True
  	if ttt_board['mid-L'] == 'O' and ttt_board['mid-M'] == 'O' and ttt_board[
  		'mid-R'] == 'O':
  		player = 'O'
  		is_winner = True
  	if ttt_board['low-L'] == 'O' and ttt_board['low-M'] == 'O' and ttt_board[
  		'low-R'] == 'O':
  		player = 'O'
  		is_winner = True
  	if ttt_board['top-L'] == 'O' and ttt_board['mid-L'] == 'O' and ttt_board[
  		'low-L'] == 'O':
  		player = 'O'
  		is_winner = True
  	if ttt_board['top-M'] == 'O' and ttt_board['mid-M'] == 'O' and ttt_board[
  		'low-M'] == 'O':
  		player = 'O'
  		is_winner = True
  	if ttt_board['top-R'] == 'O' and ttt_board['mid-R'] == 'O' and ttt_board[
  		'low-R'] == 'O':
  		player = 'O'
  		is_winner = True
  	if ttt_board['top-L'] == 'O' and ttt_board['mid-M'] == 'O' and ttt_board[
  		'low-R'] == 'O':
  		player = 'O'
  		is_winner = True
  	if ttt_board['top-R'] == 'O' and ttt_board['mid-M'] == 'O' and ttt_board[
  		'low-L'] == 'O':
  		player = 'O'
  		is_winner = True
  
  	if is_winner:
  		print(print_board(ttt_board))
  		winner(player)
code_tokens: def check_win ( print_board , ttt_board ) : is_winner = False player = '' def winner ( player ) : winner_print = [ "* * * * * * * * * * *" , "* * * * * * * * * * *" , f"   Player {player} wins!" , "* * * * * * * * * * *" , "* * * * * * * * * * *" ] for line in winner_print : time . sleep ( .5 ) print ( line ) sys . exit ( ) if ttt_board [ 'top-L' ] == 'X' and ttt_board [ 'top-M' ] == 'X' and ttt_board [ 'top-R' ] == 'X' : player = 'X' is_winner = True if ttt_board [ 'mid-L' ] == 'X' and ttt_board [ 'mid-M' ] == 'X' and ttt_board [ 'mid-R' ] == 'X' : player = 'X' is_winner = True if ttt_board [ 'low-L' ] == 'X' and ttt_board [ 'low-M' ] == 'X' and ttt_board [ 'low-R' ] == 'X' : player = 'X' is_winner = True if ttt_board [ 'top-L' ] == 'X' and ttt_board [ 'mid-L' ] == 'X' and ttt_board [ 'low-L' ] == 'X' : player = 'X' is_winner = True if ttt_board [ 'top-M' ] == 'X' and ttt_board [ 'mid-M' ] == 'X' and ttt_board [ 'low-M' ] == 'X' : player = 'X' is_winner = True if ttt_board [ 'top-R' ] == 'X' and ttt_board [ 'mid-R' ] == 'X' and ttt_board [ 'low-R' ] == 'X' : player = 'X' is_winner = True if ttt_board [ 'top-L' ] == 'X' and ttt_board [ 'mid-M' ] == 'X' and ttt_board [ 'low-R' ] == 'X' : player = 'X' is_winner = True if ttt_board [ 'top-R' ] == 'X' and ttt_board [ 'mid-M' ] == 'X' and ttt_board [ 'low-L' ] == 'X' : player = 'X' is_winner = True if ttt_board [ 'top-L' ] == 'O' and ttt_board [ 'top-M' ] == 'O' and ttt_board [ 'top-R' ] == 'O' : player = 'O' is_winner = True if ttt_board [ 'mid-L' ] == 'O' and ttt_board [ 'mid-M' ] == 'O' and ttt_board [ 'mid-R' ] == 'O' : player = 'O' is_winner = True if ttt_board [ 'low-L' ] == 'O' and ttt_board [ 'low-M' ] == 'O' and ttt_board [ 'low-R' ] == 'O' : player = 'O' is_winner = True if ttt_board [ 'top-L' ] == 'O' and ttt_board [ 'mid-L' ] == 'O' and ttt_board [ 'low-L' ] == 'O' : player = 'O' is_winner = True if ttt_board [ 'top-M' ] == 'O' and ttt_board [ 'mid-M' ] == 'O' and ttt_board [ 'low-M' ] == 'O' : player = 'O' is_winner = True if ttt_board [ 'top-R' ] == 'O' and ttt_board [ 'mid-R' ] == 'O' and ttt_board [ 'low-R' ] == 'O' : player = 'O' is_winner = True if ttt_board [ 'top-L' ] == 'O' and ttt_board [ 'mid-M' ] == 'O' and ttt_board [ 'low-R' ] == 'O' : player = 'O' is_winner = True if ttt_board [ 'top-R' ] == 'O' and ttt_board [ 'mid-M' ] == 'O' and ttt_board [ 'low-L' ] == 'O' : player = 'O' is_winner = True if is_winner : print ( print_board ( ttt_board ) ) winner ( player )
short_docstring: Refactor this horrendous function.
short_docstring_tokens: Refactor this horrendous function .
comment: """
  	Refactor this horrendous function. Also, checks to see if either player
  	X or player O has won (because Automate the Boring Stuff stopped at this
  	point in coding the game).
  
  	:param print_board: Displays board, X, and O positions to player(s)
  	:param ttt_board: Argument passed into print_board w/ position keys/values
  	:return: None, sys.exit() if is_winner == True
  	"""$SEP$# check X$SEP$# check O