About 10,100,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 …

  2. How does Python split() function works - Stack Overflow

    Dec 4, 2016 · For example \n is a newline character inside a python string which will lose its meaning in a raw string and will simply mean backslash followed by n. string.split() string.split() …

  3. python - 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?.

  4. split() vs rsplit() in Python - Stack Overflow

    Dec 13, 2022 · The difference between split and rsplit is pronounced only if the maxsplit parameter is given. In this case the function split returns at most maxsplit splits from the left …

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

    In Python, strings are already arrays of characters for all purposes except replacement. You can slice them, reference or look up items by index, etc.

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

    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 …

  7. python - How do I split a multi-line string into multiple lines ...

    Using split creates very confusing bugs when sharing files across operating systems. \n in Python represents a Unix line-break (ASCII decimal code 10), independently of the OS where you run it.

  8. Split string with multiple delimiters in Python - Stack Overflow

    Split string with multiple delimiters in Python [duplicate] Asked 14 years, 10 months ago Modified 1 year, 11 months ago Viewed 1.6m times

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

    Great. If you want alternating tokens and separators, as you usually do, it would of course be better to use \W+. The algorithm behind split also seems to indicate whether your list …

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

    Well thanks anyway, user. To be fair though I specifically asked for split and then strip () and strip removes leading and trailing whitespace and doesn't touch anything in between. A slight …