def selsort(l):
    """Selection sort. Takes a list as argument."""

    m = len(l)
    s = []
    for i in range(m):
        mini = l[i]
        for j in range(i + 1, m):
            if l[j] < mini:
                temp = mini
                mini = l[j]
                l[j] = temp
            else:
                continue
        s.append(mini)
    return s