fork download
  1. import re
  2. data = [
  3. 'The heart was made to be broken.\n',
  4. 'There is no surprise more magical than the surprise of being loved.\n'
  5. ]
  6. for line in data:
  7. line_split = re.findall(r'[^ \t\n\r, ]+',line)
  8. print line_split
Success #stdin #stdout 0.02s 4676KB
stdin
Standard input is empty
stdout
['The', 'heart', 'was', 'made', 'to', 'be', 'broken.']
['There', 'is', 'no', 'surprise', 'more', 'magical', 'than', 'the', 'surprise', 'of', 'being', 'loved.']