PEP 8: Use 4 spaces per indentation level.
Main game loop
The way your game loop is set up now is a bit unelegant. You already implemented all the methods to be able to handle both players, there's only one piece missing:
from itertools import cycle
players = cycle(['X', 'O'])
cycle will provide a generator that infinitely repeats the iterable you ...
one performance improvement suggestion
Instead of iterating through all the moves create a set with all the moves in the beginning and as each player makes a move remove the corresponding move from the set.
In your code both iterating through all moves to find the valid moves(available_moves function) and then the checking if the move given ...