i would like to print a huge list of numbers to a textfile and each line should have 5 numbers in it. each number is 20 digits long.
below is the list of number (this huge list of numbers is called a1)
3.1948343452787551598e-08 8.2713170790435268456e-08 9.2997407466072783263e-08 2.2201974063356576525e-08 4.7184351703512537954e-08 6.4869237006439418830e-08 5.6105657006093290136e-08 2.5869788723656166592e-08 3.2336150408719792489e-08 1.3711755095387755690e-08
0.8466139114156927980e-08 8.6552265489125695952e-08 1.6410391288046437544e-08 6.4151550079023113112e-08 9.9077814220256712144e-08 4.8228459783414887112e-08 1.6503915571969716123e-08 5.0759765831642425139e-08 1.4163943549368568877e-08 0.9171874262950143401e-08
2.2924892903408382299e-08 8.0910403085272639979e-08 0.1150909967310807486e-08 1.7800414806457459589e-08 9.9156327409347916878e-08 0.7474308272820071357e-08 4.8164050539957729897e-08 7.2570119501482690351e-08 5.5760621634989852061e-08 3.3409017307778332564e-08
4.7565190913441753115e-08 5.1557086343029653458e-08 6.3693801211606923532e-08 7.8897108738118126312e-08 9.4510334836961360301e-08 7.4880836459074272283e-08 4.9268327788150989424e-08 1.8466453757372403026e-08 6.2011855819003971679e-08 2.0783930984602632852e-08
0.9917554541229221025e-08 7.5224425124573985562e-08 2.6181377446191134266e-08 8.9009270149441469026e-08 7.7175189573912221707e-08 2.2170581996655944683e-08 3.2639560946849215485e-08 7.0901354279344938844e-08 5.5997044308008179085e-08 9.8907609461314007943e-08
3.1948343452787551598e-08 8.2713170790435268456e-08 9.2997407466072783263e-08 2.2201974063356576525e-08 4.7184351703512537954e-08 6.4869237006439418830e-08 5.6105657006093290136e-08 2.5869788723656166592e-08 3.2336150408719792489e-08 1.3711755095387755690e-08
0.8466139114156927980e-08 8.6552265489125695952e-08
this is what i have so far.
with open('testfile5.txt','w') as testfile5:
testfile5.write(a1)
testfile5.close()
with open('testfile5.txt','w') as testfile5:
text = ""
for a in range(al):
for i in range(5):
text += str(al[(a*5)+i])
testfile5.write(text)
testfile5.write("/n")
testfile5.close()