Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
def file_line_lengths(f: TextIO) - Dict[int, int]:
def file_line_lengths(f: TextIO) -> Dict[int, int]:
"""Return a dictionary where the keys are the lengths of the lines in the
open file f, and the values are the numbers of lines in the file
that have each length.
Newline characters 'n' should not be included when counting the length of
the string.
words.txt:
hi
there
these
are
words
>>> word_file = open('words.txt')
>>> file_line_lengths(word_file)
{2: 1, 5: 3, 3: 1}
>>> word_file.close()
"""
# Add your code here