Flatten in Python

Is there a way to call Dynamo’s Flatten function in Python? Like someList.Flatten(10) or similiar?

Yes, I have not tried it but you should be able to import the CoreNodes.dll, similar to how protogeometry or the Revit API is added.