python split string by tab

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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