colapsing multiple for loops

By Hal Canary, 2012-03-16 12:00:00 (link)

#!/usr/bin/env python

import glob, sys

def globlist(l):
    return (j for i in l for j in glob.iglob(i))

for filename in globlist(sys.argv[1:]):
    print filename

(back)