[Tutor] Saving Files for Spreadsheet Exporting

Ashish Shrestha lists@shrestha.net.np
Thu, 15 Aug 2002 21:37:35 +0545


well something that works for smaller lists. may be not efficient for
big lists!

  >>> myList = [['a','b','c'],['d','e','f'],['g','h','i']]
  >>> '\n'.join([','.join(sublist) for sublist in myList])
'a,b,c\nd,e,f\ng,h,i'

Ashish
jabber id: axhixh@jabber.org
http://www.nyatapol.com.np