15/15 What is wrong in my code?


def remove_duplicates(lis):
    result = []
    for i in lis:
        if i not in result:
            result = result.append(i)
    return result


append()will update the list for you, you don't have to store the result in a variable


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