Page 130 - Trackpad_V1_Book 8_Flipbook
P. 130

You will get the following output:
















                  Mixed Data Type List

                  A mixed data type list can be created to place different data types such as integers, strings,
                  double, etc.

                  Program 13: To create a mixed data type list






                  You will get the following output:














                  Nested List
                  A list can have a list in itself as an element.

                  Program 14: To create a nested list






                  You will get the following output:















                  ACCESSING A LIST

                  We use an index number to access the list items just like strings. Use the index operator [ ] to
                  access the elements of a list.


                  128   Trackpad (Version 1.0)-VIII
   125   126   127   128   129   130   131   132   133   134   135