def read_messages(file):
    """(file open for reading) -> list of str

    Read and return the contents of the file as a list of messages, in the order
    in which they appear in the file.
    """

    messages = []
    for line in file.readlines():
        messages.append(line.strip())
    return messages