hi, a golf course has 18 holes. There are three types of hole - par 3, par 4 and par 5. For a certain type of tournament it is necessary to generate a random list of 6 holes. The only condition is that this list should contain at least one of each type of hole. What would be an elegant way of doing this. Sample data for Ooty golf course is given below. The hole number is the first element of each tuple and the par is the second element.
[(1, 5), (2, 3), (3, 4), (4, 4), (5, 5), (6, 4), (7, 3), (8, 4), (9, 3), (10, 4), (11, 3), (12, 4), (13, 4), (14, 3), (15, 4), (16, 5), (17, 4), (18, 4)] -- regards Kenneth Gonsalves _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers