Each string in the list below corresponds to two tags:
tags = ['Club House Folk Pop ', 'alternative rock electro ']
I would like to split the string in order to create sublists with the correct genres classified, as in:
['Club house', 'Folk Pop']
and ['alternative rock', 'electro']
I know I can split the list with:
for t in tags:
tag = t.split("")
But that would disrupt the meaning of the tags.
Is there a way I can split them using one specific space ""
, like so:
tags = ['Club House Folk Pop ', 'alternative rock electro ']
^ ^
| |
| |
here here