On 2019-02-05 11:42, Rhodri James wrote:
On 05/02/2019 00:10, vinoth A N wrote:
[snip]
extension = 'mdb' result = [i for i in glob.glob('*.{}'.format(extension))]Not a bug, but you are making unnecessary work for yourself here. 'extension' is only ever the string "mdb", so why go to all the trouble of formatting it into a string when you could just write: result = [i for i in glob.glob('*.mdb')]
You can do better than that. glob returns a list! [snip] _______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
