Given a list, the task is to remove the duplicate elements. All the elements which are not in same order but made of same characters/numbers are considered as duplicates.
Input : ['gfg', 'ggf', 'fgg', 'for', 'orf', 'ofr', 'rfo', 'rof', 'fro'] Output : ['for', 'fgg'] Input: ['110', '101', '001', '010', '100'] Output: ['001', '011']
Method #1 : Using set
['1213', '0007', '0016', '0025', '0034', '0313', '0322', '0098', '0412', '0511']
Method #2 :
- Python | Remove duplicate tuples from list of tuples
- Python | Remove tuples having duplicate first value from given list of tuples
- Python | Remove last K elements of list
- Remove multiple elements from a list in Python
- Python | Remove elements of list that are repeated less than k times
- Python | Remove trailing empty elements from given list
- Python | Remove duplicate dictionaries from nested dictionary
- Python - Remove all duplicate occurring tuple records
- Python | Remove duplicate lists in tuples (Preserving Order)
- Python | Get duplicate tuples from list
- Python | Duplicate element indices in list
- Python | Removing duplicate dicts in list
- Python | Duplicate substring removal from list
- Python | Altering duplicate values from given list
- Python | Remove all values from a list present in other list
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.