from itertools import imap def join3(a,b,c): print a+b+c imap(join3,'abc','ABC','123')