Hello all, I am very new to programming and I have recently started using python. I am interested in creating a file to essentially compare data points.
I am curious if it is possible to read specific lines from files and then write those lines to another file in separate columns (for comparative purposes)? If so could someone show me how I can alter my code to do this?
Below is the code that I am using and wish to alter. The files that I am interested in reading all begin with gauss_fit_ and end with .dat , however when I ran this program to read all these files ( instead of one) it did not work.
Thanks A Million In Advance!
f=open("/home/flv1/histograms/gauss_fit_*.dat",'r')
f2=open("/home/flv1/test2.txt",'w')
for line in f:
f2.write(line)
f.close()
f2.close()