xlist [ *dx for in range( )ylist [ (xfor in xlistnow that we have the two liststhey can be sent directly to tool such as matplotlib for plottingbut before we do thiswe will introduce numpy arrays if we continue the interactive session from abovethe following lines will turn the two lists into numpy arraysimport numpy as np np array(xlisty np array(ylistmodule for arrays turn list xlist into array it is worth noting how we import numpy in the first line as alwayswe could import it with from numpy import *but this is bad habitsince numpy and math contain many functions with the same nameand we will often use both modules in the same program to ensure that we always know which module we are usingit is good habit to import numpy as we have done here using import numpy as np instead of simply import numpy saves us some typing in the rest of the code and is also more or less an accepted standard among python programmers converting lists to arrays using the array function from numpy is intuitive and flexiblebut numpy has number of built-in functions that are often more convenient to use two of the most widely used ones are called linspace and zeros the following interactive session is list-free version of the example abovewhere we create the numpy arrays directlyusing these two functionsimport numpy as np def ( )return ** np linspace( ny np zeros(nfor in range( ) [if( [ ]number of points points in [ zeros (float data typeas illustrated herewe will usually call linspace with three argumentswith the general form linspace(start,stop, )which will create an array of length ncontaining uniformly distributed values on the interval from start to stop if we leave out the third argumentas in linspace(start,stop) default value of = is used the start and stop arguments must always be provided an array of equally spaced -values is needed nearly every time we plot somethingso we will use linspace frequently it is worth spending time to become familiar with how it is used and what it returns the second numpy function used abovezeros( )does exactly what we would expectit creates an array of length containing only zeros we have seen earlier that common way to create list is to start with an empty list and fill it with values using for loop and the append-method we will