On Mar 8, 2:34 pm, dimitri pater - serpia <dimitri.pa...@gmail.com> wrote: > 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] >
What results are you expecting if you have multiple runs of 'a' in a longer list? -- http://mail.python.org/mailman/listinfo/python-list