« first day (1922 days earlier)      last day (1419 days later) » 

9:44 PM
from random import randrange

input = randrange(-2 ** 31, 2 ** 31 - 1)
print(input)

isNegative = input < 0

normalizedInput = input
if isNegative:
    normalizedInput *= -1

normalizedOutput = int("".join(list(str(normalizedInput))[::-1]))
output = normalizedOutput
if isNegative:
    output *= -1

print(output)
ping me if you answer my question.
 
2 messages moved from Python
 

« first day (1922 days earlier)      last day (1419 days later) »