mattia wrote: >[i wrote]: >> don't you just want to have a new job machine? >> >> for job_list in job_list_list: >> job_machine = dict((x+1, iter(JOBS[x])) for x in range(NJOBS)) for x >> in job_list: >> print(next(job_machine[x]))
ok - btw you can probably simplify the code. this might work: job_machine = list(map(iter, JOBS)) andrew [...] > Well, you are right, just creating every time a new dict is a good > solution, I was just adding complexity to a simple problem, thanks. -- http://mail.python.org/mailman/listinfo/python-list