Mar-10-2020, 04:52 AM
(This post was last modified: Mar-10-2020, 04:54 AM by deanhystad.)
A starting point:
import os for file in os.scandir(): if file.is_dir(): print('/', file.name, sep='') else: print(file.name)When I run this I see:
Output:model.py
part_test.py
regex.py
sandbox.py
__init__.py
/__pycache__
Another interesting function in the os module are chdir(). You can read about them here: https://docs.python.org/2/library/os.html