Practice Python

follow us in feedly Atom feed XML

Weekly beginner Python exercises

21 May 2014

List Remove Duplicates Solutions

Exercise 14

Write a program (function!) that takes a list and returns a new list that contains all the elements of the first list minus all the duplicates.

Extras:

Sample solution

This solution has two different functions doing the solution in two ways - one does it with a loop, and one with sets!

comments powered by Disqus