splitting on basis of regex python

Solutions on MaxInterview for splitting on basis of regex python by the best coders in the world

showing results for - "splitting on basis of regex python"
Lenora
14 Sep 2020
1import re
2#a string
3str = '63__foo,,bar,_mango_,apple'
4#split string into chunks
5chunks = re.split('[_,][_,]',str)
6#print chunks
7print(chunks)