14.Remove_duplicates showing error


#1



https://www.codecademy.com/courses/python-intermediate-en-rCQKw/2/4?curriculum_id=4f89dab3d788890003000096#


Oops, try again. remove_duplicates([6, 8, 122, 2, 18]) returned [4, 5, 6, 8, 122, 2, 18] instead of [8, 122, 18, 2, 6]


The code ran correctly in other compilers


lst=[]
def remove_duplicates(arg):
    for c in arg:
        if c not in lst:
          lst.append(c)
    return lst;
print remove_duplicates([4, 5, 5, 4]) .


#2

the exercise tests your function with different lists, but only the function is called, not the whole script so place lst=[] inside your function


#3

Thank You very Much!!!


#4