Python Tutorial - append vs extend methods

Veröffentlicht am: 03 January 2018
auf dem Kanal: 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  


Auf dieser Seite können Sie das Online-Video Python Tutorial - append vs extend methods mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Amulya's Academy 03 January 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 41,061 Mal angesehen und es wurde von 913 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!