If your Python interpreter is old (1.5.2, for example, which is common on some older Linux distributions), you may not have join()
available as a method on any old string object, and you will instead need to use the string module. Example:
a = ['a', 'b', 'c', 'd']
try:
b = ''.join(a)
except AttributeError:
import string
b = string.join(a, '')
The string b
will be 'abcd'
.