unable to write the output to a text file :      from urllib import request
        from redditscore.tokenizer import CrazyTokenizer
        tokenizer = CrazyTokenizer()
        url = "http://www.site.uottawa.ca/~diana/csi5386/A1_2020/microblog2011.txt"
        for line in request.urlopen(url):
            tokens = tokenizer.tokenize(line.decode('utf-8'))
            #print(tokens)
        with open('your_file.txt', 'a') as f:
            print(tokens)
            for item in tokens:
                f.write("%s\n" % item)

In the above code my output is in variable tokens in the form of list.

Output sample: ['\ufeffsave', 'bbc', 'world', 'service', 'from', 'savage', 'cuts'] ['a', 'lot', 'of', 'people', 'always', 'make', 'fun', 'about', 'the', 'end', 'of', 'the', 'world', 'but', 'the', 'question', 'is', '"are', 'u', 'ready', 'for', 'it'] ['rethink', 'group', 'positive', 'in', 'outlook', 'technology', 'staffing', 'specialist', 'the', 'rethink', 'group', 'expects', 'revenues', 'to', 'be']

Now i'm trying to print this output into a text file.

How can i do that? please help..