import clr
clr.AddReference('AcMgd')
clr.AddReference('AcDbMgd')
from Autodesk.AutoCAD.Geometry import *
tuples = IN[0]
output = []
if not isinstance(tuples, list):
tuples = [tuples]
for i in range(0, len(tuples)):
output.append(tuples[i].Z)
OUT = output
It’s probably the structure of your input list. The code I shared would work with a single value or a one-dimensional list. If you need it to work with multiple list levels, it would need to be modified. The simple fix would be to flatten the input list of coordinates first before feeding it into the Python script.
It’s not actually a string element so you can’t work with the data as a string.
Sadly I don’t have C3D experience to recreate the data set (as simple as it may be) so I can’t really help out here… Wonder if you could just type a.Z; in a code block and be done with it though.