import nltk
from urllib import request
url = "http://www.site.uottawa.ca/~diana/csi5386/A1_2020/microblog2011.txt"
response = request.urlopen(url)
raw = response.read().decode('utf8')
tokens = nltk.word_tokenize(raw)
tokens
In the above code the output is in 'tokens' in the form of list. How to copy this list into a text file?