(Feb-19-2020, 07:01 PM)michael1789 Wrote: I'm sure this is super hacky, but:
import itertools numbers = [1,2,3,4,5,6,7,8,9,10] result = itertools.permutations(numbers,2) total_permutations = 0 for item in result: total_permutations += 1 print(total_permutations)
import itertools numbers = [1,2,3,4,5,6,7,8,9,10] result = itertools.permutations(numbers,2) count = 0 for item in result: print (item) count += 1 print (count)I just worked it out with the above. Thank you for the reply though.