glob python's standard library

In python, glob module is used to find files that match
the filter criteria, the need to use the Unix shell matching rules:

*      : Matching all
 ?      : Matches one character
 *. *    : Matching as: [hello.txt, cat.xls, xxx234s.doc]
 *?.    : Matching as: [ 1 .txt, h.py]
 .gif? : The match: [x.gif, 2 .gif]

 

If there is a match, the result glob.glob (path) into a list of return

If there is no match, glob.glob (path) returns an empty list: []

 

 

 Then we put on the main directions:

 

 

 

 

 

1, Tsuhaifu

An asterisk (*) matches zero or more characters.

 

Guess you like

Origin www.cnblogs.com/wqbin/p/11695649.html