Below is a python script to create a running total of the numbers from the list it receives. I need this to work on sub-lists (currently it only works on a flat list). Can anyone provide direction on how to accomplish this? Thanks.
list = IN mass = 0 masspart =  if hasattr(list, "__iter__"): for i in range(0,len(list)): mass = mass + list[i] masspart.append(mass) else: masspart.append(list) OUT = masspart