summaryrefslogtreecommitdiff
path: root/progs/a308.py
blob: dfb363099ca805387c588677a317e5ea8f273257 (plain)
1
2
3
4
def previous_palindrome(num):
    for x in range(num-1,0,-1):
        if str(x) == str(x)[::-1]:
            return x