If current node is equal to x , append it to the list of x values
if ( head . data == x ) : NEW_LINE INDENT if ( equalHead == None ) : NEW_LINE INDENT equalHead = equalLast = head NEW_LINE DEDENT else : NEW_LINE INDENT equalLast . next = head NEW_LINE equalLast = equalLast . next NEW_LINE DEDENT DEDENT