News

You have to think differently to reverse a number. Let’s say you have the number 123. 123 = 1 * 100 + 2 * 10 + 3 First, you have to take the last digit of the number. You have done this many times.
As there is no in-built function, if you want to know how to reverse a string in Python, you will need to use one of two McGyver techniques. Fortunately, these are still relatively straightforward ...
You have to think differently to reverse a number. Let’s say you have the number 123. 123 = 1 * 100 + 2 * 10 + 3 First, you have to take the last digit of the number. You have done this many times.