List in Python
List in Python
A list is a sequence of multiple values stored together in a variable in a sequence. In a list, each element
or value is called an item. List is mutable, which means the items in a list can be modified by assigning
new values when needed .
2.What is indexing ?
indexing refers to the process of accessing a specific element in a sequence of list , using its
position or index number.The index of elements of a list starts from 0 to the end of the list ; which
means if a list contains 10 elements then its index (it is always an integer number) is from 0 to 9.
Negative indexing means to access elements in a list from the end instead of the beginning the
index of the last elements of the list will be -1 and the index of -2 refers to the second last element.
Indexinf refers to accessing the elements of the list which starts from 0 whereas slicing is a way to get
specific parts of a list by using start, end, and step values. In python list slicing is done by using the
Slicing operator(:).
list=[13,25,41,63,82]
list.extend([12,2,34,65])
print(list)
min(list): Returns the smallest element from the given list Scratch Your Brain.