The Python with construct is useful for this purpose. In place of f = open('temps.txt') for line in f.readlines(): temps.append(float(line)) ...
確定! 回上一頁