Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def main():
- nums = []
- for n in range(10):
- nums.append(random.randint(1,25))
- print('Here is the list of random integers:')
- for num in nums:
- print(num,end=' ')
- sortedlist = []
- sortedlist = sorted(nums)
- print(sortedlist)
- start = sortedlist[:4]
- print(sortedlist[:4])
- a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
- finish = sortedlist[-5:]
- print(sortedlist[-5:])
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement