How to separate this list into pieces in Python 2.6, I’m totally confused after 3 hours and need help!
['X1', 'P1(0, 0, 0)', 'P2(0, 0, 0)', 'P3(0, 0, 0)', 'X2', 'P1(0, 0, 0)', 'P2(0, 0, 0)', 'P3(0, 0, 0)', 'X3', 'P1(0, 0, 0)', 'P2(0, 0, 0)', 'P3(0, 0, 0)']
I need something like this for output:
X1 P1 0 0 0
X1 P2 0 0 0
X1 P3 0 0 0
X2 P1 0 0 0
X2 P2 0 0 0
X2 P3 0 0 0
X3 P1 0 0 0
X3 P2 0 0 0
X3 P3 0 0 0
Thanks
Will give you the desired output.