Note: I\'m working in python on this.
For example, given a list:
list = [\'a\',\'b\',\'c\',\'d\',\'e\',\'f\',\'g\',\'h\',\'i\',\'j\']
You should use the permutations function from the itertools module.
itertools
>>> import itertools >>> lst = ['a','b','c','d','e','f','g','h','i','j'] >>> itertools.permutations(lst, 3)
Or, if you really want to get combinations, then use the combinations function.