Answers for "list files from a working directory and see if it exists"

0

list files from a working directory and see if it exists

import os

# list files from a working directory
print(os.listdir())

# verify file exist
print(os.path.isfile('sales.txt'))
Posted by: Guest on October-12-2021

Code answers related to "list files from a working directory and see if it exists"

Browse Popular Code Answers by Language