Need help with python component

You could make new lofts between the curves you used for surface 1 and 2 and then in the end stitch everything together.

Btw: when asking help pls post the code and/or file instead of only a screenshot. See also this