Permutations Code In Python For Games