If you have a list of curves called curves, you can sort these by length in place like so:
curves
curves.sort(key = lambda crv: crv.GetLength())