Run
import re str = '''Welcome to PythonExamples.org''' #split string by single space chunks = re.split('\n+', str) print(chunks)
Output