appendix python review list modification the contents of specific element of the list can be modified using the subscript notation with the variable name on the left side of an assignment statement for examplethe following code segment replaces grade with gradelist[ printgradelist prints [ new items can be appended to the end of the list using the append(method the following code segment creates list of , random values by appending each value to the end of an initially empty listimport random valuelist list(for in range valuelist appendrandom random(the extend(methodwhich takes list as its argumentcan be used to append multiple items to the end of list for examplethe following code segmentlista listb lista extend printlistb produces as output [ the entire contents of the argument are appended to the end of the list for which the method was invoked the insert(list method can be used to insert items anywhere within list consider the codevalues values insert printvalues which produces the output [ the insert(method inserted value before the current item at position the remaining items were shifted down to make room for the new item python provides several methods for deleting items from list the first approach uses the remove(methodwhich allows you to delete an item by valuethelist thelist remove printthelist prints [ printlen(thelistprints to remove an item by indexyou can use the pop(methodwhich retrieves and then removes the item at the given index in the following code segmentwe use the pop( method to retrieve and remove the item at index position thelist pop print"list ="thelist print" =" prints list [ prints