Oct-03-2018, 06:22 AM
Or you can use several names in the loop. Two examples:
for number, key, value in enumerate(my_dictionary.items(), 1): print(number, key, value)
for _ , _ , files in os.walk(path): print(files)os.walk walks through a directory tree and return a current directory, directories list and the files list in that directory or subdirectory in the path in that order. In this case, I do not care about the directory/subdirectory it walks through either the directory list. I want just the to know the files so I use underscore for the first two names and ignore them.