Solution: import os for filename in os.listdir(directory): if filename.endswith(".asm") or filename.endswith(".py"): # print(os.path.join(directory, filename)) continue ...
DOWNLOAD: https://byltly.com/2eu4o6
DOWNLOAD: https://byltly.com/2eu4o6
python-loop-through-files-in-current-directory
Jan 16, 2017 — ... code to demonstrate how to iterate over files in a directory and do some action with them. import os directory = 'the/directory/you/want/to/use' .... loop over filenames, but remove file extension and path prefix. for f in Data/*.txt ; do ... add path if files are not located in working directory. for f in `cat filelist.txt`; ... 3925e8d270
Comments