@staticmethod
    def strategy(opponent):
        # Cooperate on the first move
        if not opponent.history:
            return C
        # Defects if two consecutive D in the opponent's last three moves
        history_string = "".join(opponent.history[-3:])
        if history_string in 'DD':
            return D
        # Otherwise cooperates
        return C
dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/strategies/titfortat.py/HardTitFor2Tats.strategy/swapped operands of `in`