from M2 import * SPS=func_1(A,B) with open("Res000.txt","w") as f: f.write(", ".join(str(val) for val in SPS))