Hi
I have wrestled with a problem since last weeks knapsack discussion.

This is what i want, but i cant get it into a program.
----------------------------------------
I have a sorted list (for example):
aList = [10,9,8,7,6,5,4,3,2,1]

I have a max value (for example):
maxValue=11

I have another list:
anotherList=[]

After processing "aList" i want my "anotherList" to look like this:
anotherList=[[10,1],[9,2],[8,3],[7,4],6,5]]
were every element is as close to maxValue as possible.
----------------------------------------

Can somebody give me a push in the back?

Kind Regards 
Klas
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to