import reimport sys s = sys.stdin.read()print(re.findall(r"[+-]? *(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?", s))
"177-5.877852519E-02-8.090169947E-02 0.000000000E+00 0 0"
['177', '-5.877852519E-02', '-8.090169947E-02', ' 0.000000000E+00', ' 0', ' 0']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!