I currently have a list of strings x:
[ '15.0000291159500048', '15.0000203137357904', '14.9999702802477710', '5.0000017127321428', '-5.0000029074634842', '0.0000000599304253', '0.0000001437028190', '-0.0000000724688421', '-0.0000000510019702' ]
Which I would like to print to a text file as a square by adding a newline after n elements where n = sqrt(len(x)) yielding a text file with output:
15.0000291159500048 15.0000203137357904 14.9999702802477710
5.0000017127321428 -5.0000029074634842 0.0000000599304253
0.0000001437028190 -0.0000000724688421 -0.0000000510019702
Anyone know of a clever way to accomplish this? Must I use a counter with modulus or can python do this innately more effeciently?