import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
lst = IN[0]
def splitBySequence(lst):
if lst:
grouplst = [lst.pop(0)]
for i in lst:
if i -1 == grouplst[-1]:
grouplst.append(i)
lst = [i for i in lst if i not in grouplst]
return [grouplst] + splitBySequence(lst)
else:
return []
OUT = splitBySequence(lst)
lst = map(lambda x: ord(x), IN[0])
def splitBySequence(lst):
if lst:
grouplst = [lst.pop(0)]
for i in lst:
if i -1 == grouplst[-1]:
grouplst.append(i)
lst = [i for i in lst if i not in grouplst]
return [grouplst] + splitBySequence(lst)
else:
return []
OUT = map(lambda y: [chr(x) for x in y], splitBySequence(lst))