-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?

mohanakrishnavh
  • 129
  • 1
  • 10

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
  • 44,691
  • 9
  • 89
  • 79