"Mark" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Jun 12, 3:02 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Mark wrote:
--- This was my (failed) attempt: predictions = Prediction.objects.all() scores = [] for prediction in predictions: i = [prediction.predictor.id, 0] if prediction.predictionscore: i[1] += int(prediction.predictionscore) scores.append(i) --- Your question sounds like a fun little project, but can you post what the actual list of users/scores looks like? Is it a list of tuples like this: [(1, 0), (1, 1) ... ] Or something else? -- http://mail.python.org/mailman/listinfo/python-list