from shapely.geometry import LineString
line1 = LineString([(0, 0), (1, 0), (1, 1)])
line2 = LineString([(0, 1), (1, 1)])
print(line1.intersection(line2))
How do I find the intersection of two line segments?