Home > other >  The extend statements and append statement carried out different results
The extend statements and append statement carried out different results

Time:10-04

Append to perform

The extend execution
Would you please tell me why predecessors the extend will carry out the "lee" into three elements,,,

To solve, thank you!

CodePudding user response:

Append and extend are at the end of the list add elements;
Add elements, are the way of the container to add;
The difference is that although both is added in the form of the container, but append add do add the container as a whole, but the extend is broken after adding the container just elements (join)
  • Related