How can I force appended data to a new line when writing out to an existing file please? The first line in my output file should be 943 814 2
943 814 23560581.70300000
3560591.70300000
3560601.70300000
3560611.70300000
3560621.70300000
3560631.70300000
3560641.70300000
943 814 23560581.70300000
3560591.70300000
3560601.70300000
3560611.70300000
3560621.70300000
3560631.70300000
3560641.70300000
with open(file_ls, "w") as output: output.write("%d %d %d" % (np.shape(kxx)[1], np.shape(kxx)[0], collapse_steps)) for ii in np.arange((np.shape(kxx)[1])): print("%.8f" % (kxx[0, ii]), file=output)
Larz60+ write Mar-30-2022, 11:05 AM:
Please don't post duplicate threads.
please read (from forum help):
Posts to NOT make at all:
Please don't post duplicate threads.
please read (from forum help):
Posts to NOT make at all:
- The same post in multiple sub forums. This may get you a warning, or banned based on your previous history
- ...