python split string by tab

Solutions on MaxInterview for python split string by tab by the best coders in the world

showing results for - "python split string by tab"
Rachel
10 Feb 2020
1>>> import re
2>>> strs = "foo\tbar\t\tspam"
3>>> re.split(r'\t+', strs)
4['foo', 'bar', 'spam']
5