Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
str solution in Clear category for Reverse Integer by Phil15
def reverse_digits(num: int) -> int:
return int('-' * (num < 0) + str(abs(num))[::-1])
Oct. 7, 2023
Comments: