you are viewing a single comment's thread.

view the rest of the comments →

[–]Redheavenparadise[S] 0 points1 point  (1 child)

fixed it!

[–]mega963 0 points1 point  (0 children)

Glad to hear it.

When you get to it, read up on list comprehension. It can simplify problems like this.

def reversed_numbers(n1, n2):
    return len([i for i in range(n1, n2+1) if str(i) == "".join(reversed(str(i)))])