Android & iPhone apps are coming soon. Log in for a plan and reminders made for you →

Coding basics · 13 of 20

Reverse a number

Return the digits of a non-negative integer n in reverse order, as a number (so 1200 becomes 21).

Examples

Input n = 1234

Output 4321

Input n = 1200

Output 21

Leading zeros vanish in a number.

Your code · Python

Stuck?