Small Permutation Test Python