Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python loop through files in directory

import os

for filename in os.listdir(directory):
    if filename.endswith(".asm") or filename.endswith(".py"): 
         # print(os.path.join(directory, filename))
        continue
    else:
        continue
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #loop #files #directory
ADD COMMENT
Topic
Name
4+1 =