a guest Mar 21st, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def drop_duplicates_in_place(lst):
- # Write the rest of the code for question 3b below here.
- i = 0
- while i < len(lst) - 1:
- if lst[i + 1: len(lst) - 1].count(lst[i]) > 0 :
- k = len(lst)
- for x in range (i + 1 , k):
- if lst[x] == lst[i] :
- del lst[x]
- k = k - 1
- i = i + 1
- lst = [1,2,3,4,5,6,7,8,8,2,666,9]
RAW Paste Data