output from external commands

Mike Meyer mwm at mired.org
Mon Oct 24 16:03:44 CEST 2005


darren kirby <bulliver at badcomputer.org> writes:
> If all you want is filenames this will work:
>>>> import glob
>>>> files = ["%s" % f for f in glob.glob("*")]

What's the point of doing "%s" % f? How is this different from just
file = [f for f in glob.glob("*")]?

     <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list