Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Reverse Integer by kdim
def reverse_digits(num: int) -> int:
return int('-' * (num < 0) + str(num)[::-1].rstrip('-'))
Jan. 5, 2024