Writing a list to a file with Python
You can use a loop: In Python 2, you can also use If you’re keen on a single function call, at least remove the square brackets [], so that the strings to be printed get made one at a time (a genexp rather than a listcomp) — no reason to take up all the memory required … Read more