python npr permutation calculation code example Example: python npr permutation calculation # as of python 3.8 >>> import math >>> print(math.perm(3, 3)) 6