#splits a number into a list of digitsdef split_number(n): return list(str(n))#returns whether n is a palindromedef is_palindrome(n): return (str(n) == str(n)[::-1])
Breaking a three-digit integer. Is this a good way?
This is why I love python.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement