from typing import List


def read_wordlist(fn: str) -> List[str]:
    """Read a file containing one word per line.
    Return all words as a list."""
    words = list()

    with open(fn, "r") as file:
        file_contents = file.read()
        lines = file_contents.split("\n")
        for line in lines:
            line = line.strip().replace("  ", " ")
            if not line:  # Skip empty lines
                continue
            if line.startswith("#"):  # Skip comments
                continue
            words.append(line)
    return words