Why is join() a string method instead of a list or tuple method?
In brief, it’s because join and its predecessor string.join are both generic operations that work on any iterable.
Strings became much more like other standard types starting in Python 1.6, when methods were added which give the same functionality that has always been available using the functions of the string module. Most of these new methods have been widely accepted, but the one which appears to make some programmers feel uncomfortable is:
", ".join(['1', '2', '4', '8', '16'])
which gives the result:
"1, 2, 4, 8, 16"There are two usual arguments a