About 201,000 results
Open links in new tab
  1. string - How to get the position of a character in Python ... - Stack ...

    Feb 19, 2010 · A character might appear multiple times in a string. For example in a string sentence, position of e is 1, 4, 7 (because indexing usually starts from zero). but what I find is …

  2. python - Find string between two substrings - Stack Overflow

    Jul 30, 2010 · These solutions assume the start string and final string are different. Here is a solution I use for an entire file when the initial and final indicators are the same, assuming the …

  3. python - Find all the occurrences of a character in a string - Stack ...

    Find all the occurrences of a character in a string Asked 13 years, 1 month ago Modified 1 year, 2 months ago Viewed 105k times

  4. python - How to find char in string and get all the indexes? - Stack ...

    1 As the rule of thumb, NumPy arrays often outperform other solutions while working with POD, Plain Old Data. A string is an example of POD and a character too. To find all the indices of …

  5. python - List of all unique characters in a string? - Stack Overflow

    Dec 16, 2012 · 68 I want to append characters to a string, but want to make sure all the letters in the final list are unique. Example: "aaabcabccd" → "abcd" Now of course I have two solutions …

  6. How to get a string after a specific substring? - Stack Overflow

    my_string="hello python world , i'm a beginner" print(my_string.split("world",1)[1]) split takes the word (or character) to split on and optionally a limit to the number of splits. In this example, …

  7. Python wildcard search in string - Stack Overflow

    Jul 11, 2012 · 0 Do you mean any specific syntax for wildcards? Usually * stands for "one or many" characters and ? stands for one. The simplest way probably is to translate a wildcard …

  8. Finding multiple occurrences of a string within a string in Python

    Oct 6, 2010 · The following function finds all the occurrences of a string inside another while informing the position where each occurrence is found. You can call the function using the test …

  9. python - Count the number of occurrences of a character in a …

    This should be downvoted because it is the least efficient way possible to count characters in a string. If the goal is simply to count characters, as the question indicates, it would be hard to …

  10. How to check a string for specific characters? - Stack Overflow

    How can I check if a string has several specific characters in it using Python 2? For example, given the following string: The criminals stole $1,000,000 in jewels.