- 1 is printed if there is no successor
out = 0 NEW_LINE if ( ptr . next != None ) : NEW_LINE INDENT out = ptr . next . data NEW_LINE DEDENT else : NEW_LINE INDENT out = - 1 NEW_LINE DEDENT print ( " Next ▁ of " , ptr . data , " is " , out ) NEW_LINE ptr = ptr . next NEW_LINE