Can you paste the actual code rather than a screen grab?
import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
clr.AddReference(‘RevitServices’)
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
stairs = IN[0]
def isInstance(check):
if isinstance(check, (list)): return check
else: return [check]
def getRunsLandings(stair):
runs =
landings =
stair = isInstance(stair)
stair = UnwrapElement(stair)
for s in stair:
runids = s.GetStairsRuns()
landingids = s.GetStairsLandings()
for run in runids:
runs.append(doc.GetElement(run))
for landing in landingids:
landings.append(doc.GetElement(landing))
staircomps = [runs + landings]
return staircomps
OUT = map(getRunsLandings(stairs))
above is the actual code.
Hello @netinaiV49EE,
You can change the last line of code here to use a List Comprehension to get the result you are after 
This is basically running a For Loop inside a single line.
OUT = [getRunsLandings(stair) for stair in stairs]
Great, It works Thanks !!
