if s[i]+s[i+1]=='++'andnot self.canWin(s[:i]+'--'+s[i+2:]):

returnTrue

returnFalse

This solution looks at all the possible ways any two ++'s can be replaced and continues to check using recursion if there was a way that the player cannot win. If it finds a way, then it stops and returns True, else it continues looking. If it does not find any such way to guarantee a win, it returns False

The solution is very slow since it looks at all possible ways if False, and comes in at a lowly 2.2% percentile