List is one of the simplest data structures in Python.Its very important and Lists are enclosed in square brackets [ ]. each item is separated by a comma.Every List item assign unique index no. A list is mutable, meaning you can change its contents. Lists have many built-in control functions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
List manipulation in Python :
List is one of the simplest data structures in Python.Its very important and Lists are enclosed in square brackets [ ]. each item is separated by a comma.Every List item assign unique index no. A list is mutable, meaning you can change its contents. Lists have many built-in control functions.
Methods of List objects are:
Creation:
print L :
Accessing/Indexing :
Slicing:
Lengthof items in list :
Sorting the list :
Append to end of list:
L.append("pink")