Update the values of neighbor nodes of u which are not yet included in MST .
for v in range ( n ) : NEW_LINE INDENT if ( city [ u ] [ v ] and mstset [ v ] == False and city [ u ] [ v ] < keyval [ v ] ) : NEW_LINE INDENT keyval [ v ] = city [ u ] [ v ] NEW_LINE parent [ v ] = u NEW_LINE DEDENT DEDENT