+ 1

How to remove duplicates from list including original one in Python?

Eg:- a=["a", "g", "f", "g", "s", "f"] Final list should be , ["a", "s"]

23rd Oct 2020, 1:46 PM
Ramdas Pawar
Ramdas Pawar - avatar
6 Answers
+ 2
Here's the solution in case you haven't solved it yet. https://code.sololearn.com/cZt66Hiu3e5w/?ref=app
23rd Oct 2020, 3:20 PM
QTWizard
+ 7
Pls use the description section to post ur try(code) so that we can help with that.
23rd Oct 2020, 1:51 PM
Alphin K Sajan
Alphin K Sajan - avatar
+ 1
Hint: Try to build a dictionary whose keys are the unique elements of this list and whose values are the frequencies of each letter. Once you have done that, retrieve the keys that have zero frequencies.
23rd Oct 2020, 1:52 PM
QTWizard
+ 1
Ramdas Pawar did you solve it?
23rd Oct 2020, 2:39 PM
QTWizard
+ 1
Duplicates can be removed i.e. as in this example: https://code.sololearn.com/cskwrdXNy0lL/?ref=app
23rd Oct 2020, 3:15 PM
JaScript
JaScript - avatar
+ 1
Thanks #QTWizard..😀😀
23rd Oct 2020, 3:27 PM
Ramdas Pawar
Ramdas Pawar - avatar