Use set()
:
woduplicates = set(lseparatedOrblist)
Returns a set without duplicates. If you, for some reason, need a list back:
woduplicates = list(set(lseperatedOrblist))
This will, however, have a different order than your original list.
More Related Contents:
- How to make a dict from n’th indices of tuples in list
- How do I concatenate items in a list to a single string?
- Why does this iterative list-growing code give IndexError: list assignment index out of range?
- Why does this code for initializing a list of lists apparently link the lists together? [duplicate]
- Slicing a list in Python without generating a copy
- Python list doesn’t reflect variable change
- Removing item from list causes the list to become NoneType
- Why is [] faster than list()?
- How can I multiply all items in a list together with Python?
- How to unzip a list of tuples into individual lists? [duplicate]
- Remove trailing newline from the elements of a string list
- How to loop through all but the last item of a list?
- Writing a list to a file with Python, with newlines
- How can I convert each item in the list to string, for the purpose of joining them? [duplicate]
- How can I initialize a dictionary of distinct empty lists in Python?
- Take the content of a list and append it to another list
- Extract elements of list at odd positions
- How to find the maximum value in a list of tuples? [duplicate]
- In Python, why is list[] automatically global?
- How to get the n next values of a generator in a list (python)
- Merging/adding lists in Python
- Flatten an irregular (arbitrarily nested) list of lists
- How do I sort this list in Python, if my date is in a String?
- Convert all strings in a list to integers
- “TypeError: ‘type’ object is not subscriptable” in a function signature
- Ellipsis lists […] and concatenating a list to itself [duplicate]
- Python Sort One List According to Another List
- Python and SQLite: insert into table
- Creating a list in Python with multiple copies of a given object in a single line
- How can I turn a flat list into a 2D array in python?