How can I split by 1 or more occurrences of a delimiter in Python?

前端 未结 6 1047
旧时难觅i
旧时难觅i 2020-12-05 09:56

I have a formatted string from a log file, which looks like:

>>> a=\"test                            result\"

That is, the test an

6条回答
  •  旧时难觅i
    2020-12-05 10:06

    Just do not give any delimeter?

    >>> a="test                            result"
    >>> a.split()
    ['test', 'result']
    

提交回复
热议问题