Re: Compairing filenames in a list
On 09/29/2012 09:27 PM, Kevin Anthony wrote:
> I have a list of filenames, and i need to find files with the same
> name, different extensions, and split that into tuples. does anyone have
> any suggestions on an easy way to do this that isn't O(n^2)?
Sure, collect them in a collections.defaultdict Use basename for the
key, and a list of names as the data item.
if that's not good enough, show us your code, and why it doesn't work,
and tell us what version of Python you're using.
|All times are GMT. The time now is 07:07 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.