if the number is positive, I reverse it as a string and return it as an integer

if the number is negative, I do the same method but without looking at the first char (-), then I return it as a negative integer (which is exactly like your method)
The advantage is that you can "convert" both positive and negative numbers !

## re: Learning Algorithms with JS, Python and Java 3: Integer Reversal VIEW POST

VIEW FULL DISCUSSIONMay I suggest for Python:

A little bit more concise:

`-`

), then I return it as a negative integer (which is exactly like your method) The advantage is that you can "convert" both positive and negative numbers !examples:

Also, if you want to go deeper and converting both integer and float, you could use something like this !

Which allows: