Q. Differentiate between append() and extend() functions of 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.


Post a Comment

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

Previous Post Next Post