Skip to content
Advertisement

Python: Write a list of tuples to a file

How can I write the following list:

JavaScript

to a text file with two columns (8 rfa) and many rows, so that I have something like this:

JavaScript

Advertisement

Answer

JavaScript

If you want to use str.format(), replace 2nd line with:

JavaScript
Advertisement