Python Day 7: Arrays



Given an array,A , of N integers, print A's elements in reverse order as a single line of space-separated numbers.



  1. #!/bin/python3
  2. import math
  3. import os
  4. import random
  5. import re
  6. import sys
  7. if __name__ == '__main__':
  8. n = int(input())
  9. arr = list(map(int, input().rstrip().split()))
  10. print (*arr[::-1], sep=' ')