nested_list = [[0, 1], [2, 3]]
import rhinoscriptsyntax as rs
import ghpythonlib.components as gh
#1. Разделяем на отдельные кривые
exploded = rs.ExplodeCurves(curve)
#2. Сразу сортируем линии функцией Lambda
sortList = sorted(exploded, key=lambda x: rs.CurveLength(x))
#3. Выбираем самую длинную линию
longestLine = sortList[-1]