Question: Im trying to concatenate a dynamic insert statement ( over 100 inserts ) and instead executing one by one, i want to concatenate all of the statements into only one variable.

Following, a basic exemple:

```
insert_ = " insert into table ( field,zone) values ('a','b'); "
insert_b = " insert into table ( field,zone) values ('c','d'); "
insert_c = " insert into table ( field,zone) values ('e','f'); "

list = []
list.append(insert_)
list.append(insert_b)
list.append(insert_c)
print list

```

Current output:

```
[" insert into table ( field,zone) values ('a','b'); ", " insert into table ( field,zone) values ('c','d'); ", " insert into table ( field,zone) values ('e','f'); "]

```

Desired output:

```
insert into table ( field,zone) values ('a','b'); insert into table ( field,zone) values ('c','d');  insert into table ( field,zone) values ('e','f');

```

Thanks for reading.

Answer: 
Just concatenate all of them, no need to use a list.

```
insert = insert_ + insert_b + insert_c

```
Since `join` and simple addition have been suggested, here's another option for completeness:

```
insert = '%s %s %s' % (insert_a, insert_b, insert_c)

```