Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
append() adds an element to a list. The length of the list itself will increase by one. extend() concatenates the first list with another list or another iterable, not necessarily a list. The length of the list will increase by however many elements were in the iterable argument.
9th May 2018, 2:38 AM
Huỳnh Hiền
Huỳnh Hiền - avatar