What’s the different between List.Flatten and Flatten?
Because “Flatten” is not a standaard node in Dynamo.
Thanks in advance.


What’s the different between List.Flatten and Flatten?
Because “Flatten” is not a standaard node in Dynamo.
Thanks in advance.


looks like a old node …
https://dictionary.dynamobim.com/#/BuiltIn/Action/Flatten
in python you can flatten via double for loops
elements = [[[1,2,3],[4,5,6]]]
OUT = []
for i in elements:
for x in i:
OUT.append(x)
Thanks @Draxl_Andreas
But the nodes List.Flatten and Flatten doesn’t do the same?
What if the depth of list of lists is unknown?
@Draxl_Andreas
Do you mean the following?

yes… how about Flatten? is this from a package? maybe it is used for something else
As has been mentioned, Flatten is the old, now deprecated, version of List.Flatten. They do essentially the same thing, with the exception of List.Flatten allowing you to specify an amount to flatten by - kind of like a reverse list levels flattening from the outside in.
@Draxl_Andreas it’s from a script created in Revit 2018/2019.
I’m now working in Revit 2022.