Select to view content in your preferred language

how to write python for labels

2902
2
06-11-2014 06:41 AM
Stephanie_RFulcher
New Contributor
I want to label something, but some of the labels have zeros for the first digit, such as 099.  I do not want the zero, but if the first digit is not a zero, I want it labeled, like 219.  I do not know how to write script, and wanted to know if someone could help me out.

Thanks
0 Kudos
2 Replies
SepheFox
Deactivated User

Try this one:

[Field].lstrip("0")

0 Kudos
curtvprice
MVP Alum

int([Field])

0 Kudos