Writing csv file

Hi All,
Anyone got any idea how to write a csv file from a table with the current filing syntax. Tried a few things but all failed.

@Bri_G What type of values do you have in the table. Would you want this as a text file for readText or as io .

@Bri_G Here’s something. Not sure if this is what you’re after.

function setup()
    tab={1,"asd",2,"qwe",3,4,"zxc",5,6,"qaz",8,9}
    str=""
    for a,b in pairs(tab) do
        str=str..b..","    
    end
    saveText(asset.documents.Dropbox..”qwert”,str)
    
end

@dave1707 - thanks, that worked fine.

@Bri_G Do you need anything to read a csv file and pull out what’s between the commas.

@dave1707 - thanks for the offer but you already gave me code for that with the Elite Galaxy project.

What I’m trying to do is build a CSV list of words up to make a word puzzle game.

@Bri_G depending on what your word game is, this old thread might help. https://codea.io/talk/discussion/4762/anagram-permutations-and-spell-checking#latest

It was helpful when I made an anagram base game

@West - nothing as sophisticated as your project, thanks for the link. For my own use and to encourage the grandkids to build up a good personal dictionary I am trying to build Wordle in Codea.

Scanning several sources I have amassed a list of 1,246 five letter words so far. But I am also going to add 4 and 6 letter words. Apparently there are ~159 thousand five letter words so I have a way to go yet.

I like the image compression idea and will look into that. Thanks for the link.