glob.glob() does not use regex. it uses Unix path expansion rules. How can I emulate this regex in glob:
".*.jpg|.*.png"
Well, with glob you should just do this:
lst = glob.glob('*.jpg') + glob.glob('*.png')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With