About 219,000 results
Open links in new tab
  1. Split a string by a delimiter in Python - Stack Overflow

    To split on whitespace, see How do I split a string into a list of words?. To extract everything before the first delimiter, see Splitting on first occurrence. To extract everything before the last delimiter, see …

  2. How do I split a string into a list of words? - Stack Overflow

    To split on other delimiters, see Split a string by a delimiter in python. To split into individual characters, see How do I split a string into a list of characters?.

  3. How can I split and parse a string in Python? - Stack Overflow

    I am trying to split this string in python: 2.7.0_bf4fda703454 I want to split that string on the underscore _ so that I can use the value on the left side.

  4. python - How do I split a string into a list of characters? - Stack ...

    How do I split a string into a list of characters? str.split does not work. "foobar" → ['f', 'o', 'o', 'b', 'a', 'r']

  5. regex - Split string on whitespace in Python - Stack Overflow

    31 Using split() will be the most Pythonic way of splitting on a string. It's also useful to remember that if you use split() on a string that does not have a whitespace then that string will be returned to you in a …

  6. In Python, how do I split a string and keep the separators?

    In Python, how do I split a string and keep the separators? Asked 15 years, 11 months ago Modified 4 months ago Viewed 251k times

  7. python - How to split a dataframe string column into two columns ...

    Jan 15, 2018 · 12 If you want to split a string into more than two columns based on a delimiter you can omit the 'maximum splits' parameter. You can use:

  8. python - Split string every nth character - Stack Overflow

    Feb 28, 2012 · Using the re (regex) Module: Python’s re module provides a function called findall (), which can be used to find all occurrences of a pattern in a string. We can use this function with a …

  9. How to split by comma and strip white spaces in Python?

    This doesn't work well for your example string, but works nicely for a comma-space separated list. For your example string, you can combine the re.split power to split on regex patterns to get a "split-on …

  10. How to convert comma-delimited string to list in Python?

    Oct 21, 2011 · How to convert comma-delimited string to list in Python? Asked 14 years, 2 months ago Modified 5 years, 7 months ago Viewed 533k times