How to split string by any whitespace character in Python

1 Answer

0 votes
s = 'python\tjava\n\rc++\nc\rswift'

s = s.split()

print(s)



'''
run:

['python', 'java', 'c++', 'c', 'swift']

'''

 



answered Oct 26, 2020 by avibootz
...