I have a list of tuples in the format:
(\"some string\", \"string symbol\", some number)
For example, (\"Apples\", \"=\", 10)
.
This example will allow you to loop through a list of tuples and write each tuple to a new line in a text file. Note that im using unicode instead of string:
with open('filename.txt','w') as f:
for tup in list_of_tuples:
f.write( u" ".join(map(unicode,tup))+u"\n")
The above answers map your data to string format first, which is okay if your data is not already in unicode format.