Python List

What is list?

List is a data structure which is also called collection of item , in which we can store anything like (string,float,integar)


We write the item of list inside "squared brackets[]" and each item separated by "comma ,"

Duplicates are allowed in list.

Mutable in nature.


1)Create empty list

2)list with some values

3)indexing = indexing start with 01234 

4)slicing = slicing work till -1 

5)count = it is use to count present item in list.

6)index = it is  use to know location of the item in list.


7)insert = it is use to add item in list on particular position it required the index position and variable


8)pop = it is use to delete the item from the list 

9)extend = it is use to add item at the end of the list


10)copy = Copy use to copy one list to another list


11)sort = sort is use to arrange list in ascending or descending order it work in only for numerical value.


12)reverse=it use to see list in reverse order.


13)Nested list = it is use to add list into list.

14)List Comprehension

15)List unpacking




Comments