You may want to have a look at 15.1. os — Miscellaneous operating system interfaces and 10.1. os.path — Common pathname manipulations
In your case, you can use os.listdir(path), which returns a list of all your files in given folder.
import os
path = "C:/home/me/data/picture" # full path to folder
# You can print the number of the file in the folder with
# the functions len() and os.listdir()
print(len(os.listdir(path)))
# You can get the list of the files in the folder with:
print(os.listdir(path))
# if you want a more readable outcome, print each file with for loop:
for file in os.listdir(path):
print(file)
for more operations, you may want to look to this functions:
os.environ(path), for the pathname of your home directory.
os.chdir(path), for changing directory
os.getcwd(), for your current directory
os.join(path, *paths), join paths
and many others like mkdir, makedirs, remove, removedirs
and those from pathname manipulations, like path.basename, path.dirname, path.exist, path.isfile, path.isdir...