• + 0 comments

    You can also use the fact that True == 1 in Python:

    sum([not abs(int(str(x)[::-1]) - x) % k for x in range(i, j + 1)])