Advanced pathnames

Report a typo

Match search patterns to what you will find.

Match the items from left and right columns
glob.glob('my_dir\\b*[!bf].*')
glob.glob('my_dir\\[bf]*.*')
glob.glob('my_dir\\[b-f]*.*')
glob.glob('my_dir\\*[!b]')
Subdirectories with names which do not end in b.
Filenames starting with b but not ending with b or f.
Filenames starting with b, c, d, e or f.
Filenames starting with either b or f.
___

Create a free account to access the full topic