How to split this string where __ is the delimiter
__
MATCHES__STRING
To get an output of [\'MATCHES\', \'STRING\']?
[\'MATCHES\', \'STRING\']
You can use the str.split function: string.split('__')
string.split('__')
>>> "MATCHES__STRING".split("__") ['MATCHES', 'STRING']