import os
directory = r'C:Usersadmin'
for filename in os.listdir(directory):
if filename.endswith(".jpg") or filename.endswith(".png"):
print(os.path.join(directory, filename))
else:
continue
import os
for filename in os.listdir(directory):
print(filename)
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
import os
for filename in os.listdir("/path/to/dir/"):
if filename.endswith(".asm") or filename.endswith(".py"):
# print(os.path.join(directory, filename))
continue
else:
continue