list directory using python and write into file code example
Example: python list files in current directory
import os
files = os.listdir('.')
print(files)
for file in files:
# do something
import os
files = os.listdir('.')
print(files)
for file in files:
# do something