I am very new to both Python and programming. I am in need of some help with this small project that I am working on. I have several text files in a directory. I want to compile them into one master file. There is a common variable, x and y coordinate, in all files. So I will need to match them up and then co-responding values from each txt files. so the master file should look something like this:
X Y txt01.val01 txt02.val01 txt03.val01...........
0 0 5 2 3
0 1 3 3 12
I was thinking to store each files into a dictionary using (x,y) as key and [val01, val02....] as values. Then write them to a new file. Would that work? or is there a better/simpler way of doing this?
Thanks a lot!!