0

Extend and append

What is the difference between using 'append' and 'extend' function in Python?

8th Jul 2017, 1:04 PM
Arpan Sircar
Arpan Sircar - avatar
4 Respuestas
+ 5
Check my answer in the thread you posted a few hours ago (:
8th Jul 2017, 1:23 PM
Maya
Maya - avatar
+ 5
Append can only add a single element, extend can a multiple elements
8th Jul 2017, 1:27 PM
Maya
Maya - avatar
+ 1
Bingo. I got it. It adds another list to an existing list. Thanks
8th Jul 2017, 1:27 PM
Arpan Sircar
Arpan Sircar - avatar
0
Ya, but I don't get it. It performs the same function as append
8th Jul 2017, 1:25 PM
Arpan Sircar
Arpan Sircar - avatar