my_list = [1, 2, 2, 3, 4, 4, 5]
unique_list = []

for item in my_list:
    if item not in unique_list:
        unique_list.append(item)

print(unique_list)  # Output: [1, 2, 3, 4, 5]

Leave a Reply

Your email address will not be published. Required fields are marked *