<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def top_n_list(lang, n, wordlist='best', ascii_only=False):
 """ Return a frequency list of length `n` in descending order of frequency. This list contains words from `wordlist`, of the given language. If `ascii_only`, then only ascii words are considered. """

    results = []
    for word in iter_wordlist(lang, wordlist):
        if (not ascii_only) or max(word) <= '~':
            results.append(word)
            if len(results) >= n:
                break
    return results