There’s a useful geoprocess to clip simple lines and create a separation at the intersections with other lines. This geoprocess is run on the whole layer, checking the intersections between all the polylines. We can need it to calculate intersection, lengths, selections…

We would run the script when we have a file with polylines similar to this image: