There are other functions (not yet debugged properly) for assessing board status. If you want to follow along at home, save the code as TTTUtils.py on your Desktop so you can import it in the following steps.
Here is the output, along with comments to tell what is going on:
[Update: I added several functions (multipleReps, winners, doubleThreat, etc.)]
Here's the code: