• + 1 comment

    filter and lambda together look too confusing. Generator expressions would be much better here. Also, you don't need absolute value. Mod operation should work on negative numbers. Like this:

    i,j,k = map(int,input().strip().split())
    print(sum((x-int(str(x)[::-1]))%k==0 for x in range(i,j+1)))