~ newlist = 
~for i in nlist:
~for i in newlist:
~~ if newlist.count(i) > 1:
walking through the code:
- i'm defining remove_duplicates for given item "nlist".
- i create a blank list named "newlist"
- for every item in "nlist", i'm asking to
- add them to "newlist"
- for every item in "newlist", if there is more than one of them, i'm asking to
- remove the items there are more than one of
- i am then asking the function to give the result of these actions.
why is it that when given the function [6, 6, 6, 6, 6], i am receiving [6, 6]? i asked the function to remove every item there are more than one of and two keep popping back up.
i deleted line 5 and indented the next two lines one space forward and it worked perfectly. i understand why it works now, but not previously