I need to split "WUBWUBIWUBAMWUBWUBX"
such that I get the words ['I','AM','X']
I tried using this line:
l=re.split("([W][U][B])+","WUBWUBIWUBAMWUBWUBX")
I got the output like :
['', 'WUB', 'I', 'WUB', 'AM', 'WUB', 'X']
I need to split "WUBWUBIWUBAMWUBWUBX"
such that I get the words ['I','AM','X']
I tried using this line:
l=re.split("([W][U][B])+","WUBWUBIWUBAMWUBWUBX")
I got the output like :
['', 'WUB', 'I', 'WUB', 'AM', 'WUB', 'X']