If you don't need the data files to be human readable you could improve speed saving the lists as python objects with pickle, cpickle or marshal modules, then exec would be faster.