the first few steps " of zero( [ ])" of one( [ ])and so on the very first line in the example abovei zeros( instructs python to reserveor allocatespace in memory for an array with four elements and initial values set to the next four lines overwrite the zeros with the desired numbers (measured heights)one number for each element elements areby ruleindexed (numbers within bracketsfrom to the last elementin this case we say that python has zero based indexing this differs from one based indexing ( found in matlabwhere the array index starts with as illustrated in the codeyou may refer to the array as whole by the name hbut also to each individual element by use of the index the array elements may enter in computations as individual variablese writing [ [ [ [ will compute the sum of all the elements in hwhile the result is assigned to the variable note that this way of creating an array is bit different from the one with linspacewhere the filling in of numbers occurred automatically "behind the sceneby the use of colonyou may pick out slice of an array for exampleto create new array from the two elements [ and [ ]we could write slice_h [ : note that the index specification : means indices and the last index is not included for the generated slice_h arrayindices are as usuali and in this case the very last entry in an array may be addressed ase [- copying arrays requires some care since simply writing new_h willwhen you afterwards change elements of new_halso change the corresponding elements in hthat ish[ is also changed when writing new_h new_h[ print [ in this case we do not get out on the screenbut to really get copy that is decoupled from the original arrayyou may write new_h copy(hhowevercopying slice works straightforwardly (as shown above) an explicit use of copy is not required plotting sometimes you would like to have two or more curves or graphs in the same plot assume we have as aboveand also an array with the heights mand from family next door this may be done with the program plot_heights py given as