Generate all permutations of a string or array.
Return every distinct permutation exactly once. Accept either a string or an array of hashable values. Return a list of strings for string input, or a list of arrays for array input.
Function: def generate_permutations(items):
An empty input has one permutation: the empty string or empty array. Preserve the input order when determining permutation order.
def generate_permutations(items):