I'm trying to write a large number of fields from a Class to a csv. E.g.
for i in range(0, len(t)):
t.writerow([t[i].a, t[i].b, t[i].c,...]
However I have a subclass which I also want to write at the end of this list:
for i in range(0, len(t)):
t.writerow([ t[i].a, t[i].b, t[i].c,... t[i].z[0].s, t[i].z[1].s ...])
However I'm not sure how I achieve this, the subclasses are of varying lengths, so how would I ensure that each row just appends the relevant number of subclasses at the end? I can't find anything in the documentation about it. Do I make a string out of the subclass entries, and then just paste one entry at the end? Thanks.
...is sufficient. Thanks.