input: Write a python function to check if a number is a palindrome.
  assert is_palindrome(121) == True
  assert is_palindrome(123) == False
  assert is_palindrome(1221) == True
output: def is_palindrome(num):
      return str(num) == str(num)[::-1]