Loading...
Loading...
Loading...
A driver gets the delivery numbers in the order they were booked. Print them in reverse order on one line, separated by spaces.
Example
Input
4 101 102 103 104
Output
104 103 102 101
The last booking comes first.
Try the problem first. Open one hint at a time.
A slice with a negative step walks a list backwards.
Join the numbers into text with spaces before printing.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor