s = 'aaa*bbb#ccc*ddd'
a, b = s.count('*'), s.count('#')
if a == b:
    a, b = -s.find('*'), -s.find('#')
s.split('*' if a > b else '#')
Split string by the first occurance from a set of delimiters with Python and regex