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:
There is a good explanation of why it is costly to use +
for concatenating a large number of strings here
Plus operator is perfectly fine solution to concatenate two Python strings. But if you keep adding more than two strings (n > 25) , you might want to think something else.
''.join([a, b, c])
trick is a performance optimization.