
Hi David I see where you are coming from. I find it helps to think of sep.join as a special case. Here's a more general join, with sep.join equivalent to genjoin(sep, '', ''). def genjoin(sep, left, right): def fn(items): return left + sep.join(items) + right return fn Here's how it works genjoin('', '', '')('0123') == '0123' genjoin(',', '', '')('0123') == '0,1,2,3' genjoin(',', '[', ']')('0123') == '[0,1,2,3]' All of these examples of genjoin can be thought of as string comprehensions. But they don't fit into your pattern for a string comprehension literal. By the way, one might want something even more general. Sometimes one wants a fn such that fn('') == '[]' fn('0') == '[0,]' fn('01') == '[0,1,]' which is again a string comprehension. I hope this helps. -- Jonathan