def vari(n, k):
  """Variations.
     n = total number of elements
     k = number of elements chosen

                k
     Notation: V
                n

     All elements included: no
     Can elements repeat:   no
     Order matters:         yes

     See: Number of ways there are to rearrange k elements
          from the set of n elements without repetition.

     Practical example: amount of numbers with 3 digits.
     Let the elements be: 1, 2, 3, 4:

       123, 132, 213, 231, 312, 321,
       124, 142, 214, 241, 412, 421
  """
  # n! / (n-k)!
  result = 1
  for i in range(n-k+1, n+1):
    result *= i
  return result