4 lines Python
def validTicTacToe(self, board):     b = '|'.join(board)     x, o = (any(p*3 in b[s::d] for s in range(9) for d in (1, 3, 4, 5)) for p in 'XO')     m = b.count(
    def validTicTacToe(self, board):
        b = '|'.join(board)
        x, o = (any(p*3 in b[s::d] for s in range(9) for d in (1, 3, 4, 5)) for p in 'XO')
        m = b.count('X') - b.count('O')
        return m == (not o) if m else not x

<br>

### Explanation and stuff

I first join a board like `"XOX", "O O", "XOX"` into a single string like `"XOX|O O|XOX"`. Then I can easily get rows/columns/diagonals by one-dimensional slicing. For example the main diagonal (with digits for clarity):
```
>>> "123|456|789"[::5]
'159'
```
In general index delta `d=1` goes to the right, `d=4` goes down, `d=5` goes down-right and `d=3` goes down-left. And I try that from every needed start index `s` and a few more. The slices aren't exactly the rows/columns/diagonals, but they include them and they don't include anything they shouldn't (thanks to the `|` row separator).

So to find out whether player `'X'` has a winning line, I just check whether `"XXX"` is in any of those slices.

Then I also determine the move difference `m`, how many more moves player `'X'` made. Again it is helpful to have the board in a single string that I can just ask for the counts.

If they players made the same number of moves, then I just need to check that `'X'` has no winning line. Otherwise `'X`' must have made exactly one more move and `'O'` must not have a winning line. That's what my last line checks. You could also do

        return (m == 0 and not x) or (m == 1 and not o)

but I just had some fun making it smaller. I also considered negative the meaning of `x` and `o` so they tell whether the players *don't* have winning lines:

    def validTicTacToe(self, board):
        b = '|'.join(board)
        x, o = (not any(p*3 in b[s::d] for s in range(9) for d in (1, 3, 4, 5)) for p in 'XO')
        m = b.count('X') - b.count('O')
        return m == o if m else x
				
That saves a bit overall but made the already longest line longer, plus I just don't like the negative view.

Golf-ish version just for fun (that's for Python 3, for Python 2 the deltas need to be (1,7,8,9)):

    def validTicTacToe(self, b):
        b=str(b);x,o=(not any(p*3in
        b[s::d]for s in range(99)for
        d in(1,6,7,8))for p in'XO')
        c=b.count;m=c('X')-c('O')
        return m==o if m else x

[]