The math.perm()
function computes the number of ways to choose k items from n items with order and without repetition.
math.perm(n, k = None)
copy
The optional parameter k, if not specified, defaults to n.
The function returns the value of n! / (n - k)! when k <= n . If k > n, the function returns zero.
The function raises TypeError
if either of the arguments are not integers. A ValueError
if either of the arguments are negative.