In this Python Programming video tutorial you will learn the basic difference between append and extend methods in detail.
Here in this tutorial first we'll see what is append method, this append method is used to add the element at the end of the list.
So next we discussed about the extend method, this method is used to add the elements at the end of the list.
The difference between append and extend is
in the append we will add single element at the end of the list but here in the extend we will append the all the elements of the iterables .And in append we can add any list, string or any number to the list, but in extend only we can add the elements of a iterables .
So third difference is in the append method the length of the list will be incremented by one. that's because in the append function we will add single value at the end of the list. So length of the list will be incremented by 1, but in extend method length increment will be based on how many elements present in that iterables .
For more free tutorials on computer programming
/ amulsacademy
/ amulsacademy
Nesta página do site você pode assistir ao vídeo on-line Python Tutorial - append vs extend methods duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Amulya's Academy 03 January 2018, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 41,061 vezes e gostou 913 espectadores. Boa visualização!