import resubject = "-1007.88670550662*p**(-1.0) + 67293.8347365694*p**(-0.416543501823503)"a,_,b,c = re.findall(r"[\d\-.]+", subject)print a,b,c
Standard input is empty
-1007.88670550662 67293.8347365694 -0.416543501823503
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!