Flip

Report a typo

Let's try to reverse a numeric sequence. Read it from the input and print its numbers in reverse order separated by spaces.

You can use slicing list[::-1] or the method list.reverse() to invert the order. Notice that the numbers themselves should remain unchanged, for example, 23 is not the same as 32.

Sample Input 1:

1 22 3

Sample Output 1:

3 22 1

Sample Input 2:

17 9

Sample Output 2:

9 17
Write a program in Python 3





___

Create a free account to access the full topic