[TIP] Using module GLOB to find patterns from filenames

If you are using python to find patterns  in filenames, you must use  the glob module.

The glob module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell. No tilde expansion is done, but *?, and character ranges expressed with [] will be correctly matched.

For more information, please see the documentation.