Page 1 - Lesson Note - LISTS
P. 1

LIST


               A list is a collection of comma separated values(items) within square brackets. Items in a list need
               not be of the same type.
               A list is a sequence like strings, tuples but it differs from them in a way that lists are mutable but
               strings and tuples are immutable.


               Creating List
               List can be created by putting comma separated values/items within square brackets.





























               Creating List through list() function

               list() – function converts certain types of objects into list.
                   1.  List can be created from a string using list()
                   2.  Empty list can be created using list()
                   3.  User input list can be created using list()
   1   2   3   4   5   6