Theodoros Emmanouilidis

Notes & Thoughts

Make A List With All Unique Items In A List Python


This is just an one-liner, but very useful and convenient.

Suppose we have a python list


and we only want to return a list containing all unique elements of that list. We can use the “set” python command and construct a new list with all the unique elements of the original list.


print list_unique


Python rocks!!

posted under Tip Of The Day