Python Tutorial - append vs extend methods

Publicado el: 03 January 2018
en el canal de: Amulya's Academy
41,061
913

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  


En esta página del sitio puede ver el video en línea Python Tutorial - append vs extend methods de Duración hora minuto segunda en buena calidad , que subió el usuario Amulya's Academy 03 January 2018, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 41,061 veces y le gustó 913 a los espectadores. Disfruta viendo!