I want to change the following code
for directory, dirs, files in os.walk(directory_1): do_something() for directory, dirs, files in os.walk(directory_2
I think itertools.chain() should do it.