Duct weight with Dynamo + Python


Hi Guys.

I need help, please.

I want to get the width, height and length of the rectangular duct, find the area and weight by Python. But my dynamo blocks return sublists that are not accepted in my Python code. Another problem is that my blocks take round ducts and return “null”, I want to eliminate this. How do I get only the height, width and length of the Rectangular Duct in the form of lists?

This is my logic Dynamo:

My code Python:

I have simulated some heights, widths and lengths and the code works with lists.:white_check_mark:
(Largura=Width ; Altura = Height; Comprimento = Length)

Can someone help me?