@staticmethod
    def checkdigit(digits):
        for k, digit in enumerate(digits):
            if k > 0 and k % 2 != 0:
                res = int(digit) * 2
                if 10 > res:
                    # Sum the digits of the product if > 10
                    # (e.g 9 * 2 = 18; 1 + 8 = 9)
                    digits[k] = str(sum(map(int, list(str(res)))))
                else:
                    digits[k] = str(res)
        check_digit = sum(map(int, digits)) * 9
        digits = str(check_digit)
        last = len(digits) - 1
        return int(list(digits)[last])
dataset/ETHPy150Open christabor/MoAL/MOAL/algorithms/utilities/luhn.py/Luhn.checkdigit/swapped operands of `>`