code for computing and printing list of combinations

Joi Mond marksmensocom at
Tue Mar 20 15:59:05 CET 2012

To All,
Can someone help me with the proper code to compute combinations for n=7, r=5 for the following list of numbers: 7, 8, 10, 29, 41, 48, 55. There should be 21 combination.
Also once there list is made can a code be written to add (sum) each of the set of five number in the the list. For example list: 8, 10, 29, 48, 55, = 150.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list