Rearrange so elements < pivot come first, then pivot, then elements > pivot.
Implement this function:
def pivot_list(lst: list, pivot) -> list:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: lst, pivot.
Input
[3, 1, 4, 1, 5, 9, 2, 6]
4
Output
[3, 1, 1, 2, 4, 5, 9, 6]