Articles → PYTHON → Arrays in python

Arrays in python






What are arrays?





Syntax


Array_object = array(typecode,[elements separated by comma])































Example


from array import *

my_array = array('i',[1,2,3,4])


for element in my_array:
    print(element)



Output


Picture showing the output of arrays in python

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Saturday, June 01, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250