for point in segment.points:
    print('Point at ({0},{1}) -> {2}'.format(point.latitude, point.
        longitude, point.elevation))
for waypoint in gpx.waypoints:
    print('waypoint {0} -> ({1},{2})'.format(waypoint.name, waypoint.
        latitude, waypoint.longitude))
for route in gpx.routes:
    pass
How to extract .gpx data with python