Skip to content
Advertisement

How can I remove duplicate words in a string with Python?

Following example:

JavaScript

How can I remove the second two duplicates "calvin" and "klein"?

The result should look like

JavaScript

only the second duplicates should be removed and the sequence of the words should not be changed!

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement