Discussion Forum | Board Infinity

What is the difference between extending and append

Extending and Append difference.

Append adds its argument as a single element to the end of a list. The length of the list itself will increase by one. extend iterates over its argument adding each element to the list, extending the list. The length of the list will increase by however many elements were in the iterable argument