def insertSort(sortList):
    """
    插入排序
    :param sortList: 排序的列表
    :return: 排序后的列表
    """
    for index in range(1, len(sortList)):

        currentValue = sortList[index]
        position = index

        while position > 0 and sortList[position-1] > currentValue:
            sortList[position] = sortList[position-1]
            position -= 1
        sortList[position] = currentValue

    return sortList