The function num_permutation_sequence(n)

Use the yield statement to write the function num_permutation_sequence(n) that returns a generator of 𝑃𝑛,𝑘 with k from 0 to n.

Sample Solution