# Enable Python support and load DesignScript library
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
lstMaster = IN[0]
indiceLst = []
for lst in lstMaster:
indices = [i for i, x in enumerate(lst) if x == "Landing"]
indiceLst.append(indices)
targetInfo = []
boolResult = []
for lst in indiceLst:
info = ""
itemToBeReplaced = ""
if len(lst) == 1:
boolResult.append(False)
continue
sum = 0
delta = lst[0]
for i, num in enumerate(lst):
if num - i == delta:
sum += 1
if sum == len(lst):
boolResult.append(True)
for i, num in enumerate(lst):
if not (i % 2 == 0):
itemToBeReplaced = str(num) + "\n"
info = "Bizarre List " + str(indiceLst.index(lst)) + "\n" + "Item to be replaced at index " + itemToBeReplaced
targetInfo.append(info)
else: boolResult.append(False)
# Assign your output to the OUT variable.
OUT = indiceLst, boolResult, targetInfo
Had to copy/paste it into Visual Studio Code and copy from there, then the formatting worked