To get just the maximum value and not the entire object you can use a generator expression:
print(max(node.y for node in path.nodes))
To get just the maximum value and not the entire object you can use a generator expression:
print(max(node.y for node in path.nodes))