The str.split()
method without an argument splits on whitespace:
>>> "many fancy word \nhello \thi".split()
['many', 'fancy', 'word', 'hello', 'hi']
More Related Contents:
- How would I get everything before a : in a string Python
- Python regex: splitting on pattern match that is an empty string
- Splitting a math expression string into tokens in Python
- How t extract last part of a text in python [duplicate]
- Regex not matching all the paranthesis substrings [duplicate]
- How to extract numbers from a string in Python?
- Split Strings into words with multiple word boundary delimiters
- Split string every nth character?
- Speed up millions of regex replacements in Python 3
- Fast punctuation removal with pandas
- Python regex – r prefix
- How to input a regex in string.replace?
- How can I split and parse a string in Python?
- How can I do multiple substitutions using regex?
- How do I split a multi-line string into multiple lines?
- How to split strings into text and number?
- Reading a text file and splitting it into single words in python
- Get last “column” after .str.split() operation on column in pandas DataFrame
- How to match any string from a list of strings in regular expressions in python?
- Extract a string between double quotes
- Split string based on regex
- removing newlines from messy strings in pandas dataframe cells?
- Convert list of strings to dictionary
- How can I split this comma-delimited string in Python? [duplicate]
- Is there a way to split a string by every nth separator in Python?
- How to split by comma and strip white spaces in Python?
- Split string at every position where an upper-case word starts
- FutureWarning: The default value of regex will change from True to False in a future version
- Split text after the second occurrence of character
- Adding characters after a certain word in Python using regex