In Python, generate a program that takes in a user-defined list and produces a new list with all the duplicates removed.
def remove_duplicates(my_list):
    my_list = list(dict.fromkeys(my_list))
    return my_list