Export list as .txt (Python)
Posted
by Nimbuz
on Stack Overflow
See other posts from Stack Overflow
or by Nimbuz
Published on 2010-02-22T04:54:06Z
Indexed on
2010/03/20
8:21 UTC
Read the original article
Hit count: 377
My Python module has a list that contains all the data I want to save as a .txt file somewhere. The list contains several tuples like so:
list = [ ('one', 'two', 'three'), ('four', 'five', 'six')]
How do I print the list so each tuple item is separated by a tab and each tuple is separated by a newline?
Thanks
© Stack Overflow or respective owner