Consider the following code for string concatenation.

Consider the following code for string concatenation.


def concat(s1, s2):
    result = s1
    for ch in s2:
        result += ch
    return result

How efficient is it? :



  1.     Very efficient.
  2.     Not very efficient because it copies only one character per iteration.
  3.     Very inefficient because it frequently reallocates the contents of result.
  4.     Not very efficient because it is written in python.