I am trying to fill a field of a shapefile that is delevoped by a number of unions. The content of the field is supposed to inform about the origin of a polygon in the shape.
I am not experienced in python scripts, so my solution is not quite elegant:
def FillInfo(Info,Info_WB,Info_UESG,Info_GB,Info_Moo,Info_HHS,Info_PT,Info_SN,Info_SA): return Info_WB + ',' + Info_UESG + ',' + Info_GB + ',' + Info_Moo + ',' + Info_HHS + ',' + Info_PT + ',' + Info_SN + ',' + Info_SA
Info is the field that is supposed to contain the information regarding the origin of the polygon and Info_NN are the fields containing this information.
The problem is, I do not want a row of commas if the fields are empty.
How can I manage to only string together "valid" entries?