I used a generator to create s
s= generator(n)
the generator yeilds (a,b) for n in a range(n). where a=[w,x] and b=[y,z]
printing s using
for i in s:
print i
this returns:
([0.27704232355167768, 0.44459304959240675], [0.4387731877846518, 0.38108111684466683])
([0.27704232355167768, 0.44459304959240675], [0.6362447250743466, 0.72047209074359853])
([0.27704232355167768, 0.44459304959240675], [0.65419386891877318, 0.025362727486327286])
([0.27704232355167768, 0.44459304959240675], [0.039966264334369672, 0.9662795347591735])
However I would like
0.27704232355167768 0.44459304959240675 0.4387731877846518 0.38108111684466683
0.27704232355167768 0.44459304959240675 0.6362447250743466 0.72047209074359853
0.27704232355167768 0.44459304959240675 0.65419386891877318 0.025362727486327286
0.27704232355167768 0.44459304959240675 0.039966264334369672 0.9662795347591735
I have tried many variations of the idea below
print '\n'.join('\t'.join(x) for x in s)
but to n0 avail and tend to return the s in the same format. Can anyone help me around this issue?
chainflattens each row, so you can just join all of the elements with a tab, then join rows with newline.