Python Interpret String As Variable Resistor