open a filename starting with in python

48

open a filename starting with in python -

for file in os.listdir("/Users/darren/Desktop/test"):
    if file.startswith("art"):
        print(file)

Comments

Submit
0 Comments