Answers for "how to print all images path python"

0

how to print all images path python

""
code to print all jpg, png, docx, pdf. for the path provided 
""
def process(contentpath):
    jpg_images = glob.glob(contentpath + '/*.jpg')
    print("jpg images \n",jpg_images)
    png_images = glob.glob(contentpath + '/*.png')
    print("\n png images \n",png_images)
    documents = glob.glob(contentpath + '/*.docx')
    print("\n docxx - \n",documents)
    pdfs_inside = glob.glob(contentpath + '/*.pdf')
    print("\n pdfsss - \n ",pdfs_inside)
    
    return 
  
process(r' input the path of the folder here ')
Posted by: Guest on April-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language