Sep-20-2018, 07:46 PM
I'm trying to use a for loop and a nested for loop
So what I have is:
I realize if I use glob I probably can't use the "f" I defined earlier in the for loop. But how can I use the same path that is assigned to f to use in the nested for loop, x?
For the nested loop, x, I wanted it to loop through all the files in that directory.
So what I have is:
for f in glob("/Users/Desktop/network5"): for x in glob(f/NET_00*): print x break breakThis doesn't give me any output.
I realize if I use glob I probably can't use the "f" I defined earlier in the for loop. But how can I use the same path that is assigned to f to use in the nested for loop, x?
For the nested loop, x, I wanted it to loop through all the files in that directory.