1import os
2directory = 'the/directory/you/want/to/use'
3
4for filename in os.listdir(directory):
5 if filename.endswith(".txt"):
6 #do smth
7 continue
8 else:
9 continue
1import os
2
3for filename in os.listdir(directory):
4 if filename.endswith(".asm") or filename.endswith(".py"):
5 # print(os.path.join(directory, filename))
6 continue
7 else:
8 continue
1import os
2
3for filename in os.listdir(directory):
4 if filename.endswith(".asm") or filename.endswith(".py"):
5 # print(os.path.join(directory, filename))
6 continue
7 else:
8 continue
9