Sounds to me like join would work better as a function ;)
Admittedly, the join syntax is somewhat counter-intuitive and arguably ugly, but it does the job without defining new built-in functions or adding extra syntax. If you really can't stand the syntax, you can always do this:
# old style way of joining strings
import string
string.join([1,2,3], ' ')
or: str.join(' ', [1,2,3])
Of course method #1 requires importing an extra module (which can be a bit of a pain) and method #2 requires knowing more about python's implementation of str (as you argued about using str.capitalize), but they work. Generally though, the syntax isn't that bad, but you have alternatives if you want them.In [1]: x = [1,2,3]
In [2]: y = [4,5,6]
In [3]: x + y
Out[3]: [1, 2, 3, 4, 5, 6]
Why use 6 [join()] characters when you can use 1 :)
Even if you disagree, the line between methods and functions in Python really isn't standardized.
reduce(operator.add, list_of_lists)
You can not say sum(), sadly, because it forces a restriction that you only sum numbers.
>>> sum([['a', 'b', 'c'], ['d', 'e', 'f']], [])
['a', 'b', 'c', 'd', 'e', 'f']
This makes use of the optional start argument and list add operator. However, Python's docs suggest using itertools.chain instead:http://docs.python.org/library/functions.html#sum
>>> import itertools
>>> [l for l in itertools.chain(*[['a', 'b', 'c'], ['d', 'e', 'f']])]
['a', 'b', 'c', 'd', 'e', 'f']
(Of course you lose the benefit of a generator by using a list comprehension, but this is just an example.) >>> from itertools import chain
>>> list_of_lists = [['a', 'b', 'c'], ['d', 'e', 'f']]
>>> list(chain(*list_of_lists))
['a', 'b', 'c', 'd', 'e', 'f']
That is, list(«foo») is clearer and more idiomatic than [x for x in «foo»]. >>> from itertools import chain
>>> chain(*[['a', 'b', 'c'], ['d', 'e', 'f']])