I have a code from a physical simulation that I read with MANY INFORMATION and many interactions. For example, I have the qt load calculation, however, there are 100 interactions and I'm working with a qt vector of size 101! I need to save the data from this qt for every interaction I have in a .txt file:
f2.write('%.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f\n'
%(qt[0],qt[1],qt[2],qt[3],qt[4],qt[5],qt[6],qt[7],qt[8],qt[9],qt[10]))
This is an example of when I have 10 qt's. How would I generalize this so I do not have to write 101 times the '%.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f \t %.20f\n'
?