I have a file that is like this:
word, number
word, number
[...]
You can just use f.write(str(word)+"\\n")<\/code> to do this.
Here
str<\/code> is used to make sure we can add "\\n".
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.