I have a list
A=[9.6, 7.9, 19.4, 13.3, 31.0, 16.1, 44.3, 16.4, 55.7, 16.5, 66.6, 16.7, 77.7, 17.7, 88.7, 19.0, 101.8, 21.0]
It is actually a 1-D representation of a series of 2-D points. The even-indexed values are x values, and the odd ones are y.
I now wish to convert A
into
B=[(9.6, 7.9), (19.4, 13.3), (31.0, 16.1), (44.3, 16.4), (55.7, 16.5), (66.6, 16.7), (77.7, 17.7), (88.7, 19.0), (101.8, 21.0)]
What is the most pythonic way of doing so?