ulvis.paste.net - pastebin

Paste Search Dynamic
Recent pastes
Reverse
  1. #from array import *
  2.  
  3. arr = []
  4. n = int(input(" "))
  5.  
  6. for i in range(n):
  7.   x = int(input(" "))
  8.   arr.append(x)
  9.  
  10.  
  11. def Reverse(lst):
  12.     lst.reverse()
  13.     return lst  
  14.  
  15.  
  16. y = Reverse(arr)
  17.  
  18. lists = []  
  19. for i in range(0,5):
  20.   lists.append(arr[i] + y[4-i])
  21.  
  22. print(lists)
Parsed in 0.004 seconds