from typing import TextIO

def is_correct(file: TextIO, word: str) -> bool:
    """Return True iff word is in file.
    
    >>> dict_file = open('dictionary.txt')
    >>> is_correct(dict_file, 'Zyrtec')
    True
    >>> dict_file.close()
    >>> dict_file = open('dictionary.txt')
    >>> is_correct(dict_file, 'lolz')
    False
    >>> dict_file.close()
    """
    
    #return word in file  #won't work
    # return word in file.readlines()  # won't work
    for line in file:
        if word == line.strip(): # get rid of the newline
            return True
        
    return False