On Wednesday, September 7, 2016 at 4:00:31 PM UTC+8, Steven D'Aprano wrote: > On Wednesday 07 September 2016 17:08, iMath wrote: > > > Any easier solutions on returning a list of absolute file or directory path > > within a directory? Mine is > > > > list(map(lambda entry: os.path.join(directory,entry),os.listdir(directory))) > > > Use a list comprehension: > > > [os.path.join(directory,entry) for entry in os.listdir(directory)] > > > > -- > Steven > > git gets easier once you get the basic idea that branches are homeomorphic > endofunctors mapping submanifolds of a Hilbert space.
yes, a list comprehension does make the code more readable -- https://mail.python.org/mailman/listinfo/python-list