import re
from collections import defaultdict

string = '-12.5e-1 x^3 + -5 x^2 --0.5x +-0.75x^3 +6'

pattern = re.compile(r'\s*([+-])\s*([-+]?(?:(?:\d*\.\d+)|(?:\d+\.?))(?:[Ee][+-]?\d+)?)\s*(x(\^\d+)?)?')

coefficients = defaultdict(int)
string = '+' + string.rstrip()
while string:
    match = pattern.match(string)
    if not match:
        raise ValueError('Invalid input starting with {}'.format(string))
    sign = 1 if match.group(1) == '+' else -1
    coefficient = sign * float(match.group(2))
    if match.group(3):
        exp = match.group(4)
        exp = 1 if exp is None else int(exp[1:])
    else:
        exp = 0
    coefficients[exp] += coefficient
    string = string[match.end():]

print (coefficients)