Getting the index of the returned max or min item using max()/min() on a list

I’m using Python’s max and min functions on lists for a minimax algorithm, and I need the index of the value returned by max() or min(). In other words, I need to know which move produced the max (at a first player’s turn) or min (second player) value. for i in range(9): new_board = current_board.new_board_with_move([i … Read more