def permute(lst, perm):
    """Permute the given list by the permutation.

    Args:
      lst: The given list.
      perm: The permutation. The integer values are the source indices, and the
        index of the integer is the destination index.

    Returns:
      A permutation copy of lst.
    """
    return tuple([lst[i] for i in perm])