Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nums_amt = int(input())
- num_list = list(map(int, input().split()))
- first_half = []
- i = 0
- while i <= len(num_list) // 2:
- first_half.append(num_list[0])
- num_list.pop(0)
- i += 1
- first_half.sort()
- num_list.sort(reverse=True)
- print(first_half, num_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement