I am new-ish to python and need to write a short program which will take a file with many lines of sets of coordinates alongside a defined variable of a series of letters and out a 3 columned file with columns x, y, and letter.
the input file has each line in the form of
[(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (-1,7), (-1, 8), (0, 8)]
and there is a defined variable Prot which has the same length as the number of coordinate pairs in each line of the input file (0.traj).
I've tried having it readlines and treat it like a list but I can't get it to work.
I need a different output file for each line in the file (number of lines change per file) but the defined variable Prot only changes once per file.
Thanks in advance for any help.