Source Code:
(back to article)
original_list = [1, 2, 3, 4, 2, 5, 3, 6] # Convert to set to remove duplicates no_duplicates_set = set(original_list) # Convert back to list no_duplicates_list = list(no_duplicates_set) print(no_duplicates_list) # Output: [1, 2, 3, 4, 5, 6]
Result:
Report an issue