List In Python
list is the primary collection data type for managing a set of related items.
list can be mutated including appending, inserting and removing items.
To create a list, a sequence of comma separated values is wrapped in square brackets.
That value can be any python object including integers, floats, booleans, string, other objects and even other lists.
Empty lists can be created simply using the square bracket with no sequence of comma separated values.
The values in list also called items.
The last element is at index -1.
Creating a list: Creating a list is very easy, you can create a Python list using square brackets and wrap comma-separated list items in square brackets.
del list[index] - to remove by index from the list.
list.remove(item) - to remove by value raises ValueError if not present.
remove() -equivalent to del list[list.index(item)].
list.insert(index,item)-to insert an items in a list.
sorted() buit-in function sorts any iterable series and returns a list.
reversed() built -in function reverses any iterable series returns a reverse iterator.