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