-3

How to split a string based on Split Strings based on White spaces, new lines, and tab spaces and store them in a list in Python?

1 Answers1

3

I think what you want here is the .split() method on strings

>>> s = 'one two\tthree\nfour'
>>> s.split()
['one', 'two', 'three', 'four']
John Szakmeister
  • 41,719
  • 9
  • 84
  • 75