notice that del is not list methodbut built-in operation that can be used on list items as you can seepython lists provide very flexible mechanism for handling arbitrarily large sequences of data using lists is easy if you keep these basic principles in minda list is sequence of items stored as single object items in list can be accessed by indexingand sublists can be accessed by slicing lists are mutableindividual items or entire slices can be replaced through assignment statements lists support number of convenient and frequently used methods lists will grow and shrink as needed statistics with lists now that you know more about listswe are ready to solve our little statistics problem recall that we are trying to develop program that can compute the meanmedianand standard deviation of sequence of numbers entered by the user one obvious way to approach this problem is to store the numbers in list we can write series of functions--meanstddevand median--that take list of numbers and calculate the corresponding statistics let' start by using lists to rewrite our original program that only computes the mean firstwe need function that gets the numbers from the user let' call it getnumbers this function will implement the basic sentinel loop from our original program to input sequence of numbers we will use an initially empty list as an accumulator to collect the numbers the list will then be returned from the function here' the code for getnumbersdef getnumbers()nums [start with an empty list sentinel loop to get numbers xstr input("enter number to quit>"while xstr !"" eval(xstrnums append(xadd this value to the list xstr input("enter number to quit>"return nums using this functionwe can get list of numbers from the user with single line of code data getnumbers(nextlet' implement function that computes the mean of the numbers in list this function takes list of numbers as parameter and returns the mean we will use loop to go through the list and compute the sum