Answers for "how can I look at the other things ina folder with python"

1

python get files in directory

from pathlib import Path
for txt_path in Path("/path/folder/directory").glob("*.txt"):
  print(txt_path)
Posted by: Guest on November-30-2020
0

how to make all my files to work together in python

>>> import os
>>> entries = os.listdir('my_directory/')
Posted by: Guest on September-03-2020

Code answers related to "how can I look at the other things ina folder with python"

Python Answers by Framework

Browse Popular Code Answers by Language