def readlines(filename):
    """
    Read a file and return the contents as a list of lines.

    Arguments:
        filename name of the file to read

    Returns:
        A list of stripped lines.
    """
    with open(filename) as infile:
        lines = infile.readlines()
    return [l.strip() for l in lines]