code for computing and printing list of combinations

Joi Mond marksmensocom at yahoo.com
Tue Mar 20 10:59:05 EDT 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.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120320/a833f9f3/attachment.html>


More information about the Python-list mailing list