Page 78 - Modular v1.1 Pyhton
P. 78

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


















                  Program 11: To access a list of given elements beyond its range.









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
























                     Recap


                           List is a homogeneous collection of data elements.
                           Traversing means accessing or visiting the elements of a list.
                           Nested list can be traversed by using the index operator.
                            Negative indexing means the index of -1 refers to the last elements of the list, the index of -2
                           refers to the second last element.
                            Lists is mutable which means the elements of a list can be changed or new elements can be
                           added into a list by using an assignment operator (=).
                            Joining, repeating, slicing and comparing list are the several operations which can be performed
                           on lists.
                            append( ),  extend( ),  insert(x,  a),  remove( ),  index( ),  count( ),  pop([i]),  copy( ),  clear( ),  sort( ),
                           reverse( ) are the various built-in list methods.
                           len(list), max(list), min(list) are the various built-in list functions.



                   76     Touchpad MODULAR (Version 1.0)
   73   74   75   76   77   78   79   80   81   82   83