Pop from queue
queue2 = queue2 [ : - 1 ] NEW_LINE x = up [ 0 ] NEW_LINE dis = up [ 1 ] NEW_LINE if ( dis > dist1 [ x ] ) : NEW_LINE INDENT continue NEW_LINE DEDENT if ( x == 0 ) : NEW_LINE INDENT continue NEW_LINE DEDENT