You are viewing a single comment's thread. Return to all 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)])
Beautiful Days at the Movies
You are viewing a single comment's thread. Return to all 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)])