def run(filename, write_it):
    wa = Words(filename)
    if write_it:
        with open('Output.txt', 'w') as fp:
            ' if argument value -w is equal to True redirect the output to\n            a text file if argument value -w is equal to False or not specified\n            the output will be redirected to the console '
            with redirect_stdout(fp):
                display(wa)
                display_top_words(wa, MAX_DIPLAY)
    display(wa)
    display_top_words(wa, MAX_DIPLAY)
def run(filename, write_it):
    wa = Words(filename)
    if write_it:
        with open('Output.txt', 'w') as fp:
            ' if argument value -w is equal to True redirect the output to\n            a text file if argument value -w is equal to False or not specified\n            the output will be redirected to the console '
            with redirect_stdout(fp):
                display(wa)
                display_top_words(wa, MAX_DIPLAY)
    display(wa)
    display_top_words(wa, MAX_DIPLAY)