Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my_lst = [0,100,200,300,400,500,600,700,800,900,1000] # added 0 index number
- # sort reversed: 9,6,4,3,1
- for i in sorted([1,3,9,6,4], reverse=True):
- del my_lst[i]
- print(my_lst)
- [0, 200, 500, 700, 800, 1000]
Add Comment
Please, Sign In to add comment