Use list name as string

Vincent Davis vincent at
Wed Feb 4 17:24:00 CET 2009

Do to laking knowledge my google searches have not turned up an answer for me.
I know this is wrong it uses the items in the list as the filename,
how do I refer to the dataname and not the items in it.

def savedata(dataname):
    filename = str(dataname)  # this does not do what I would like it to
    ext1 = '\.csv'
    flex = filename + ext1
    datawrite = csv.writer(open(flex, "wb"))

Vincent Davis

More information about the Python-list mailing list