Screwing Up looping in Generator

Sayth Renshaw flebber.crue at
Tue Jan 3 00:35:58 EST 2017

So can I call the generator twice and receive the same file twice in 2 for 

Once to get the files name and the second to process?

 for file in rootobs:
        base = os.path.basename(
        write_to = os.path.join("output", os.path.splitext(base)[0] + ".csv")
        with open(write_to, 'w', newline='') as csvf:
            for file in rootobs:
              # create and write csv



More information about the Python-list mailing list