def getlines(fname):
    """
    Returns the content of a file as a list of lines, striped of the '\n'
    and trainling spaces.

    Parameters
    ----------
    fname : str
        Text file to open.

    Returns
    -------
    List of lines

    """
    with open(fname) as f:
        content = f.readlines()
    return [line.rstrip() for line in content]