#!/usr/bin/python import re import sys for line in sys.stdin: res = re.findall('(.*?) \((.*?)\)', line) plot1 = ["(0,0)"] plot2 = ["(0,0)"] plot3 = ["(0,0)"] current = 100; for tup in res: val = float(tup[0]); stdev = float(tup[1]); plot1.append("(" + str(current) + "," + "{0:.3f}".format(val) + ")") plot2.append("(" + str(current) + "," + "{0:.3f}".format(val + stdev) + ")") plot3.append("(" + str(current) + "," + "{0:.3f}".format(val - stdev) + ")") current += 100 print("{{{0}}};".format("".join(plot1))) print("{{{0}}};".format("".join(plot2))) print("{{{0}}};".format("".join(plot3)))