Hi, I working on a road dataset and found all the roads that intersect, like the to roads below:

I want to investigate if the z-value from the two roads are the same. I used arcpy.FeatureVerticesToPoints_management the get the XYZ values from each road, and load them into two python list, like in the example below:
road1 = [(1,2,3),(3,4,5),(4,6,8)]
road2 = [(3,4,6),(1,2,4),(4,5,3)]
The first think I want to do, is to check whatever the roads share vertices (Same XY value) and if the do, whats the difference in their z-value.
I tried with this function:
def compareLineVertiex(list_orginid,list_destid):
sameXY = []
for (x,y,z) in list_orginid:
xy = x,y
if xy in list_destid:
sameXY.append(xyz)
return sameXY
I only managed to compare their XY values. I am missing the z-value (which will be difference from the two list)