Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. numbers_amt = int(input())
  2. num_list = list(map(int, input().split()))
  3. for i in range(numbers_amt // 4):
  4.     num_list[i], num_list[numbers_amt // 2 - 1 - i] = num_list[numbers_amt // 2 - 1 - i], num_list[i]
  5.     num_list[numbers_amt - 1 - i], num_list[numbers_amt // 2 + i] = num_list[numbers_amt // 2 + i], num_list[numbers_amt - 1 - i]
  6. print(*num_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement