note well that the firstand lastmethods of the positional list adt return the associated positionsnot the elements (this is in contrast to the corresponding first and last methods of the deque adt the first element of positional list can be determined by subsequently invoking the element method on that positionas firstelementthe advantage of receiving position as return value is that we can use that position to navigate the list for examplethe following code fragment prints all elements of positional list named data cursor data firstwhile cursor is not noneprint(cursor element)cursor data after(cursorprint the element stored at the position advance to the next position (if anythis code relies on the stated convention that the none object is returned when after is called upon the last position that return value is clearly distinguishable from any legitimate position the positional list adt similarly indicates that the none value is returned when the before method is invoked at the front of the listor when first or last methods are called upon an empty list thereforethe above code fragment works correctly even if the data list is empty because the adt includes support for python' iter functionusers may rely on the traditional for-loop syntax for such forward traversal of list named data for in dataprint(emore general navigational and update methods of the positional list adt are shown in the following example example the following table shows series of operations on an initially empty positional list to identify position instanceswe use variables such as and for ease of expositionwhen displaying the list contentswe use subscript notation to denote its positions operation add last( firstl add after( before(ql add before( elementl after(pl before(pl add first( delete( last) replace( return value none