Introduction
In this article, I will explain Array in Python. Arrays are used to store one or more values in one single variable. An array is a set of items saved at contiguous reminiscence locations. The concept is to store a couple of items of the identical kind together. This makes it less difficult to calculate the position of each element.

Access the Elements of an Array.
Array element is referring to the index number.
Example
- color= ["red", "blue", "green"]
- print (color [0]) #red is 0 position
- print (color [2]) #green is 2 position
Output
First array element and last array element value.
Modifying elements
Change the array element.
Example
- color= ["red", "blue", "green"]
- color [0] ="black"
- print(color)# red changes to black.
Output
First array element value change.

Access the array Elements in reverse order.
The array element is accessed in a reverse direction.
Example
- color= ["red", "blue", "green"]
- print (color [-1]) #green is the last position.
Output
Last array element value.

The length of an array.
The len() method is used to return the number of elements present in an array.
Syntax
- Len(list)
Example
- color= ["red", "blue", "green"]
- print(len(color))
Output
Return the number of elements in the “color” array.

Adding array elements.
The append () method is used to add an element in the last position of the array.
Syntax






Surya SPosted Mar 18, 2020, 7:43 AM
Thank you sir
Vijayaragavan SPosted Mar 18, 2020, 4:48 AM
Great start....Surya...