Append | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Append

What is append used for in python or JavaScript or in any other languages

17th Feb 2018, 3:49 PM
Pranav
Pranav - avatar
1 Answer
+ 13
list.append(elem) -- adds a single element to the end of the list. ...list.insert(index, elem) -- inserts the element at the given index, shifting elements to the right. list.extend(list2) adds the elements in list2 to the end of the list.
17th Feb 2018, 4:11 PM
Abhivarshini Maddala
Abhivarshini Maddala - avatar