I\'m pretty new to Python and am completely confused by .join()
which I have read is the preferred method for concatenating strings.
I tried:
To append a string, just concatenate it with the +
sign.
E.g.
>>> a = "Hello, "
>>> b = "world"
>>> str = a + b
>>> print str
Hello, world
join
connects strings together with a separator. The separator is what you
place right before the join
. E.g.
>>> "-".join([a,b])
'Hello, -world'
Join takes a list of strings as a parameter.