permutation in python

NoSuchKey