Newbie question - leading zeros
timothy.grant at gmail.com
Fri Oct 13 20:28:54 CEST 2006
On 10/13/06, eldorado <eldorado at io.com> wrote:
> I have looked around and cannot seem to find a way to strip leading zeros
> off of values in a dictionary. Basically, I am looking to do a for loop
> and any value that has one or more leading zeros would be stripped. Any
> pointers would be appreciated. Thanks
Do you really want to be storing the string representation of the int?
int('0000123') will convert the string representation to the number.
More information about the Python-list