More pythonic version of permutation.