Create a function that differentiates a polynomial for a given value of `x`.
Your function will receive 2 arguments: a polynomial as a string, and a point to evaluate the equation as an integer.
## Assumptions:
* There will be a coefficient near each `x`, unless the coefficient equals `1` or `-1`.
* There will be an exponent near each `x`, unless the exponent equals `0` or `1`.
* All exponents will be greater or equal to zero
## Examples:
```python
differenatiate("12x+2", 3)      ==>   returns 12
differenatiate("x^2+3x+2", 3)   ==>   returns 9
```
def differentiate(eq, point):
    eq = eq.replace('-', ' -').strip()
    eq = eq.replace('+', ' +').strip()
    eq = eq.replace('-x', '-1x')
    eq = eq.replace('+x', '+1x')
    eq = eq.split(' ')

    eq = [i if i[0].isalpha() == False else "1"+i for i in eq]
    
    if "x" not in eq[-1]: eq.pop(-1)
    for i in range(len(eq)):
        if eq[i][-1] == "x":
            eq[i] = eq[i][:-1] + "x^1"
        j = int(eq[i][-1])
        eq[i] = int(eq[i][:-3]) * j * (point ** (j-1))

    return sum(eq)
def differentiate(eq, point):
    eq = eq.replace('-', ' -').strip()
    eq = eq.replace('+', ' +').strip()
    eq = eq.replace('-x', '-1x')
    eq = eq.replace('+x', '+1x')
    eq = eq.split(' ')

    eq = [i if i[0].isalpha() == False else "1"+i for i in eq]
    
    if "x" not in eq[-1]: eq.pop(-1)
    for i in range(len(eq)):
        if eq[i][-1] == "x":
            eq[i] = eq[i][:-1] + "x^1"
        j = int(eq[i][-1])
        eq[i] = int(eq[i][:-3]) * j * (point ** (j-1))

    return sum(eq)