Generate a program in Python that will check if a given number is a palindrome.
123321
def is_palindrome(n):
 n = str(n)
 
 return n == n[::-1]
 
num = 123321
if is_palindrome(num):
 print(f"{num} is a palindrome")
else:
 print(f"{num} is not a palindrome")