Page 130 - Plus V4 with Adobe class 8
P. 130

On running the above program, you will get the following output:














                   Interdisciplinary Learning


                   #English

           Create a list of ten most common English idioms and phrases in Python.

                                                                                                   #Lab Activity


             SLICING THE LIST


        List slicing refers to a part of a list. In Python, list slicing is done by using the Slicing operator(:).
        Syntax of slicing the list:

        name of the list[ start : stop : step ]
             start is the start position of the list.

             stop is the end position of the list.
             step is the increment of the list (the step parameter is optional and by default is 1).
        To perform the slicing of lists, follow the program given below.













        On running the above program, you will get the following output:















             LIST METHODS

        To make the use of lists easier, Python provides various built-in methods. Let’s explore about them.





            128  Plus (Ver. 4.0)-VIII
   125   126   127   128   129   130   131   132   133   134   135