Ad
Code
Diff
  • reverse = lambda n: int(str(n)[::-1]) if isinstance(n, int) else n[::-1]
    • def reverse(n):
    • return int(str(n)[::-1]) if isinstance(n, int) else str(n)[::-1]
    • reverse = lambda n: int(str(n)[::-1]) if isinstance(n, int) else n[::-1]