Remove duplicate items from a list using set
A common problem beginners face is to remove duplicate items from a list. In Python it can be done easily. First make a set from the list and then make a list for that set. myList = list(set(myList)) Here is a python example: >>> myList = [1, 2, 3, 3, 2, 2, 4, 5, 5] >>> myList [1, 2, 3, 3, 2, 2, 4, 5, 5] >>> myList = list(set(myList)) >>> myList [1, 2, 3, 4, 5] >>> Let me know if you use any different technique to remove duplicates from a list.