In Python it can be done easily. First make a set from the list and then make a list for that set.
a_List = list(set(a_List))
Here is a python example: >>> a_List = [1, 2, 3, 3, 2, 2, 4, 5, 5]
>>> a_List
[1, 2, 3, 3, 2, 2, 4, 5, 5]
>>> a_List = list(set(a_List))
>>> a_List
[1, 2, 3, 4, 5]
Comments are always welcome!Have a Happy Python!
No comments:
Post a Comment