List

 

    List is a powerful data structure in python

     

  • list[]
  •  

  • It is an iterable object
  •  

  • We can create new list from Iterable items
  •  

  • Class List(Object)
  •  

  • help(list)
  •  

    Index to a List object

     

     

    Min, Max, len

     

  • Min: returns MIN value from list
  • Max: returns MAX value from list
  • len: returns length of list
  •  

     

     

    Sort Method

     

  • Sorts the data
  • default sorting is Ascending Order
  •  

     

     

    Sort in reverse

     

     

     

    Sorting a list which consits of strings

     

     

     

    Concatenate two lists

     

  • Second list elements added at the end of first list
  •  

     

     

    List append Method

     

     

     

    List Clear Method

     

     

     

    List Extend Method

     

     

     

    Nested List

     

     

     

    Repetition of List

     

     

     

    Eval Function

     

  • It enables to add a list
  •  

     

     

    Remove Method of List

     

     

     

    List Methods: Count, Index, append, sort

     

     

     

    List reverse order

     

     

     

    Unpack List elements

     

     

    Unpack the list elements

     

     

    List - Pop Method

     

  • pop
  •  

 

Index of List

 

 

Convert the string into List

 

 

List Slicing

 

 

Split a string and append to the List

 

 

Retrieve Elements from tuple, which is a object of list

 

 

Top2 values from List

 

 

Bottom3 values from List

 

 

Unpacking list elements

 

 

Print top two values based on index numbers

 

 

Print top two strings based on length of string