Advertisement
Guest User

Untitled

a guest
Apr 10th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. nums_amt = int(input())
  2. num_list = list(map(int, input().split()))
  3. first_half = []
  4. i = 0
  5. while i <= len(num_list) // 2:
  6.     first_half.append(num_list[0])
  7.     num_list.pop(0)
  8.     i += 1
  9. first_half.sort()
  10. num_list.sort(reverse=True)
  11. print(first_half, num_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement