← Back to challenges

Number to Reversed Array

PythonMediumformattinglanguage_fundamentalsnumbersarrays

Instructions

Create a function that takes a number and returns a list with the digits of the number in reverse order.

Examples

reverse_list(1485979) ➞ [9, 7, 9, 5, 8, 4, 1]

reverse_list(623478) ➞ [8, 7, 4, 3, 2, 6]

reverse_list(12345) ➞ [5, 4, 3, 2, 1]

Notes

N/A

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Video Streaming Plans