14/ 15 remove duplicates


14/ 15 remove duplicates
when i enter my code i am returned with the error
"Oops, try again. remove_duplicates([4, 5, 5, 4]) resulted in an error: 'list' object has no attribute 'apppend'" any idea as to how to fix this? Thanks

def remove_duplicates(list):
for int in list:
if int not in new_list:
return new_list
print remove_duplicates([1,1,1,1,1,1,4])



Please note the spelling error in the above.


Choose variable names that are not reserved words. int is a reserved word. Sure it might still work without conflict, but it makes reading of the code more difficult.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.