Python Control Transfer Function Formula Algebra