def read_file_by_line(file):

    """
    reads a text file line by line
    :param file: path to file
    :return: list of all lines
    """

    word_list = list()
    with open(file, mode='r', encoding='utf-8') as f:
        for line in f:
            line = line.strip()
            word_list.append(line)
    return word_list