Ad

Basically flips the number given and returns the result integer.

Code
Diff
  • # Takes int or string input
    # Returns int
    def flip_the_number(num):
        return int(str(num)[::-1])
    
    • # Takes int or string input
    • # Returns int
    • def flip_the_number(num):
    • return num[::-1]
    • return int(str(num)[::-1])