def generate_results(test_list, total_time, sort_type):
    """
    Takes the information from the test functions and builds the results
    into a string for readability

    :param test_list: Python list that is ideally sorted
    :param total_time: Time object that is total time of the sort
    :param sort_type: String of the done to get the result
    """

    # create an empty string
    result_str = ""

    # add the appropriate string based on if the list is sorted
    if test_list == sorted(test_list):
        result_str += "Test: Successful\t"
    else:
        result_str += "Test: Fail\t"

    # build the final string with the sort type given
    result_str += "{} sort time: {:5f} seconds".format(sort_type, total_time)

    return result_str