def strategy(self, opponent):
        # Defect on the first move
        if not opponent.history:
            return D
        # Am I TFT?
        if self.is_TFT:
            return D if opponent.history[-1:] == [D] else C
        else:
            # Did opponent defect?
            if opponent.history[-1] == D:
                self.is_TFT = True
                return C
            if [1, 2] in len(self.history):
                return C
            # Alternate C and D
            return flip_action(self.history[-1])
dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/strategies/axelrod_second.py/Tester.strategy/swapped operands of `in`