Personal tools

Python Lists





Remove duplicates from a Python list

thelist = [6,6,4,8,9,2,3,4,5,6]
cleanlist = list(set(thelist))


Combining a list of lists into one list

thelist = [[6,6,4,8,9],[2,3,4,5,6]]
combined = sum([item for item in thelist], [])




Free link to your website when you post your code