Posts

Showing posts with the label Day 13(list methods)
Image
 DAY 13(CODE INFINITY) Today we study about list methods as we have discussed about lists in previous blog so I hope lists are very clear in mind that they are changeable so we apply different methods according to our need. we se uses of every method here I give you brief about every method in easy language. There are following list methods: 1. Sort : This method sort the list in ascending order original list is updated. you can call this as sort subtype if you need list in descending order for this you can use reverse=True.  2. reverse: This will reverse the order of the given list. 3. index : This method returns the index of first occurrence of the list item. 4 .count : This returns count of number of items with the given value. 5. copy : This returns copy of the list. This can be done to perform operations on the list without modifying the original list. 6. append: This method appends items to the end of existing list. 7. insert : This inserts an item at the given index....