N
noamtm
Hi,
Some functions, like os.walk(), return multiple items packed as a
tuple:
for (dirpath, dirnames, filenames) in os.walk(...):
Now, if you don't care about one of the tuple members, is there a
clean way to ignore it, in a way that no unused variable is being
created?
What I wanted is:
for (dirpath, , filenames) in os.walk(...):
But that doesn't work.
Thanks, Noam.
Some functions, like os.walk(), return multiple items packed as a
tuple:
for (dirpath, dirnames, filenames) in os.walk(...):
Now, if you don't care about one of the tuple members, is there a
clean way to ignore it, in a way that no unused variable is being
created?
What I wanted is:
for (dirpath, , filenames) in os.walk(...):
But that doesn't work.
Thanks, Noam.