before your code - I reversed them here so you could see what I mean (had I not done that, the part of my sentence in-between the tags would have been formatted as a block of code. You originally expressed interest in the Python parser, so the below corrected code should work, using the expression, RemoveZero(!M_U_!): def RemoveZero(txtStr): txtLst = txtStr.split('-') txtStr = txtLst[0] + '-' + str(int(txtLst[1])) return txtStr
def RemoveZero(txtstr): txtList = list(txtstr) if (txtList[2] == '0'): txtList2 = txtList[0], txtList[1], txtList[3] txtstr = ''.join(txtList2) return txtstr else: return txtstr
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.