in either case the result is the list ['cedar''yew''fir''kauri''larch'individual items can be added at the end of list using list append(items can be inserted at any index position within the list using list insert()or by assigning to slice of length for examplegiven the list woods ["cedar""yew""fir""spruce"]we can insert new item at index position ( as the list' third itemin either of two wayswoods[ : ["pine"woods insert( "pine"in both cases the result is the list ['cedar''yew''pine''fir''spruce'individual items can be replaced in list by assigning to particular index positionfor examplewoods[ "redwoodentire slices can be replaced by assigning an iterable to slicefor examplewoods[ : ["spruce""sugi""rimu"the slice and the iterable don' have to be the same length in all casesthe slice' items are removed and the iterable' items are inserted this makes the list shorter if the iterable has fewer items than the slice it replacesand longer if the iterable has more items than the slice to make what happens when assigning an iterable to slice really clearwe will consider one further example imagine that we have the list [" "" "" "" "" "" "]and that we assign an iterable (in this casea listto slice of it with the code [ : [" "" "firstthe slice is removedso behind the scenes the list becomes [' '' '' 'and then all the iterable' items are inserted at the slice' start positionso the resultant list is [' '' '' '' '' 'items can be removed in number of other ways we can use list pop(with no arguments to remove the rightmost item in list--the removed item is also returned similarly we can use list pop(with an integer index argument to remove (and returnan item at particular index position another way of removing an item is to call list remove(with the item to be removed as the argument the del statement can also be used to remove individual items--for exampledel woods[ ]--or to remove slices of items slices can also be removed by assigning an empty list to sliceso these two snippets are equivalentwoods[ : [del woods[ : in the left-hand snippet we have assigned an iterable (an empty listto sliceso first the slice is removedand since the iterable to insert is emptyno insertion takes place slicing and striding when we first covered slicing and stridingwe did so in the context of strings where striding wasn' very interesting but in the case of listsstriding allows us to access every -th item which can often be useful for examplesuppose we have the listx [ ]and we want to set every odd-indexed item ( [ ] [ ]etc to we can access every second item by