class Solution: def isSameAfterReversals(self, num: int) -> bool: if not num: return True return num % 10