def list_from_txt(name):
    """
    This function reads the lines of a txt file and 
    writes them as a list.

    :param str name: name of the txt file

    :returns: list of the lines in txt file

    """
    filein = open(name, "r")

    list_dataset = []
    for line in filein.readlines():
        if not line.strip():
            continue
        else:
            list_dataset.append(line.rstrip())
    filein.close()

    return list_dataset