create an array from 1 to 10 python code example Example: initialize array of natural numbers python a = array.array('i',(0 for i in range(0,10)))