<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Selection Sort
The algorithm <em style="color
Step1:  The algorithm to delete an element $x$ from a list $L$ is formulated recursively.  There are three
cases
<ASSISTANT_TASK:>
Python Code:
def sort(L):
    if L == []:
        return []
    x = min(L)
    return [x] + sort(delete(x, L))
Explanation: Selection Sort
The algorithm <em style="color:blue;">selection sort</em> is specified via two equations:
If $L$ is empty, $\texttt{sort}(L)$ is the empty list: 
    $$ \mathtt{sort}([]) = [] $$
Otherwise, we compute the smallest element of the list $L$ and we remove the first occurrence of
    this element from $L$.  Next, the remaining list is sorted recursively.  Finally, the smallest 
    element is added to the front of the sorted list:
    $$ L \not= [] \rightarrow \mathtt{sort}\bigl(L\bigr) = 
       \bigl[\texttt{min}(L)\bigr] + \mathtt{sort}\bigl(\mathtt{delete}(\texttt{min}(L), L)\bigr)
    $$
End of explanation
def delete(x, L):
    assert L != [], f'delete({x}, [])'
    y, *R = L
    if y == x:
        return R
    return [y] + delete(x, R)
L = [3, 5, 7, 4, 8, 1, 2, 3, 11, 13, 2]
sort(L)
Explanation: The algorithm to delete an element $x$ from a list $L$ is formulated recursively.  There are three
cases:
If $L$ is empty, we could return the empty list: 
    $$\mathtt{delete}(x, []) = [] $$
    However, this case is really an error, because when we call $\texttt{delete}(x, L)$ we always 
    assume that $x$ occurs in $L$.
If $x$ is equal to the first element of $L$, then the function delete returns the
    rest of $L$: 
    $$ \mathtt{delete}(x, [x] + R) = R$$
Otherwise, the element $x$ is removed recursively from the rest of the list: 
    $$ x \not = y \rightarrow \mathtt{delete}(x, [y] + R) = [y] + \mathtt{delete}(x,R) $$
End of explanation
<END_TASK>