n = int(input())lst = list(map(int, input().split()))[:n]print(lst[::-1])
6 2 2 2 2 2 2
[2, 2, 2, 2, 2, 2]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!