Re: related lists mean value

2010-03-08 Thread dimitri pater - serpia
thanks Chris and MRAB! Looks good, I'll try it out On Tue, Mar 9, 2010 at 12:22 AM, Chris Rebert wrote: > On Mon, Mar 8, 2010 at 2:34 PM, dimitri pater - serpia > wrote: >> Hi, >> >> I have two related lists: >> x = [1 ,2, 8, 5, 0, 7] >> y = ['a&#x

related lists mean value

2010-03-08 Thread dimitri pater - serpia
Hi, I have two related lists: x = [1 ,2, 8, 5, 0, 7] y = ['a', 'a', 'b', 'c', 'c', 'c' ] what I need is a list representing the mean value of 'a', 'b' and 'c' while maintaining the number of items (len): w = [1.5, 1.5, 8, 4, 4, 4] I have looked at iter(tools) and next(), but that did not help me