def get_largest_palindrome(n): n -= 1 while n > 0: if palindrome(n): return n n -= 1 return n
def get_largest_palindrome(n): n -= 1 while n >= 0: if palindrome(n): break n -= 1 return n
def get_largest_palindrome(n): for i in range(n-1, 0, -1): if palindrome(i): return i