About 1,590,000 results
Open links in new tab
  1. Remove Duplicate Letters - LeetCode

    Remove Duplicate Letters - Given a string s, remove duplicate letters so that every letter appears once and only once. You must make sure your result is the smallest in lexicographical order among all …

  2. Find all Duplicate Characters in String in Python

    Oct 31, 2025 · Given a string, the task is to find all characters that appear more than once in it. For example: Input: "GeeksforGeeks" Output: ['G', 'e', 'k', 's'] Below are multiple methods to find all …

  3. How to remove duplicate chars in a string? - Stack Overflow

    Dec 15, 2021 · String in python is a list of chars, right? But lists can have duplicates... sets cannot. So, if we convert list to set, then back to list, we'll get a list without duplicates ;P I've seen a suggestion to …

  4. Best way to remove duplicate characters (words) in a string?

    Apr 19, 2013 · What would be the best way of removing any duplicate characters and sets of characters separated by spaces in string? I think this example explains it better: foo = 'h k k h2 h' should …

  5. How to Remove Duplicate Characters from a String in Python

    Learn effective methods to remove duplicate characters from a string in Python, including code examples and common mistakes.

  6. Remove Duplicates From List of Lines

    Effortlessly remove duplicate lines from your text lists with our simple, efficient tool. DeDupeList.com is designed to help streamline your workflow, saving time and ensuring accuracy when managing lists …

  7. Removing specific duplicated characters from a string in Python

    Apr 6, 2018 · I undup-ed this since Remove consecutive duplicate characters from a string in python wants to remove all characters if they're duplicated, this one just wants to reduce them to a single …

  8. Remove Duplicates from a List in Python - GeeksforGeeks

    Dec 20, 2025 · Let’s explore the different methods to remove duplicates from a list. Using Dictionary fromkeys () This method removes duplicates by converting list elements into dictionary keys using …

  9. Remove Duplicate Characters from a String in Python

    Learn how to remove duplicate characters from a string in Python using set(), loops, and list comprehension.

  10. Remove specific characters from a string in Python

    Oct 15, 2010 · I'm trying to remove specific characters from a string using Python. This is the code I'm using right now. Unfortunately, it appears to do nothing to the string.