Q. What is the difference between appending a list and extending a list?


Answer =

The append() can add a single elements to the end of the list while extend() can add argument-list’s all elements to the end of the list.

After append(), the length of the list will increase by 1 element only while after extend(), the length of the list will increase by the length of inserted list.

1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Very easy to study and learn easily from this web site sup....................

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post