If we are talking about a '*' in the pattern, then, typically *
just means "match any number of characters" or better "match 0 or more characters", so if we assume we have files in a directory: apple cherry custard green_apple
then you can get lists of files for example:
import glob
print("glob.glob('a*') -> {}".format(glob.glob('a*'))) # match starting with 'a'
print("glob.glob('*a*') -> {}".format(glob.glob('*a*'))) # match anything that contains an 'a'
print("glob.glob('apple*') -> {}".format(glob.glob('apple*'))) # match if starts with 'apple'
print("glob.glob('*apple*') -> {}".format(glob.glob('*apple*'))) # match if 'apple' is in the filename
This would return
glob.glob('a*') -> ['apple']
glob.glob('*a*') -> ['apple', 'custard', 'green_apple']
glob.glob('apple*') -> ['apple']
glob.glob('*apple*') -> ['apple', 'green_apple']
This is a very simplistic view of what you can do with glob.glob.