Reputation: 1
Please I want to get all files that begins with [a letter]_lehn_[any word or letter] and I wrote this code (Python code in ipython notebook). But it didn't return any file for me. Example of some of my files are "A_lehn_1(23)","4 B_lehn_1(2)copy".
import glob
from image_file_name in glob.glob('?_lehn_?.png'):```
Upvotes: 0
Views: 1405
Reputation: 833
wildcards should work....
import glob
from image_file_name in glob.glob('*'+ '_lehn_' + '*' + '.png'):
Upvotes: 2