a wrote: > What I want > --------------- > I want to create a list of items from a function operating on an array > of strings
def func(s): return s.upper() arrayOfStrings = ['bicycle', 'repair', 'man'] print "solution 1: with map()" print map(func, arrayOfStrings) print "solution 2: with list comprehension" print [func(s) for s in arrayOfStrings] -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list