[newbie] plotting pairs of data

Miki Tebeka miki.tebeka at gmail.com
Wed Dec 19 11:58:17 EST 2012


On Wednesday, December 19, 2012 6:38:30 AM UTC-8, Thomas Bach wrote:
> On Wed, Dec 19, 2012 at 05:47:30AM -0800, hugocoolens wrote:
> > ['0.0364771 0.55569', '0.132688 0.808496', '0.232877 0.832833',
> > '0.332702 0.849128', '0.432695 0.862158']
> xs = [ float(x) for x, _ in map(str.split, l) ]
> ys = [ float(y) for _, y in map(str.split, l) ]
Let's play golf :)
xs, ys = zip(*(map(float, s.split()) for s in l))



More information about the Python-list mailing list