Breaking News

Python Array part-1

                           ARRAY


 

A  array is an assortment of things put away at adjoining memory areas. The thought is to store different things of a similar kind together. ... Cluster can be dealt with in Python by a module named exhibit . They can be helpful when we need to control just a particular information type esteems. A client can regard records as exhibits.

 from array import*

 a=array('i', [1,2,4,5,6,7,7,])

   print(a)

output:

array('i', [1, 2, 4, 5, 6, 7, 7])

from array import*
a=array('h', [1,2,3,4,5,6,7,7]) 

 print(type(a))

output:

<type 'array.array'>
import array as arr
a=array('i', [1,2,3,4,5,6,7,7])
print(a)
output:
array('i', [1, 2, 3, 4, 5, 6, 7, 7])
 

No comments