Newbie question - leading zeros
Timothy Grant
timothy.grant at gmail.com
Fri Oct 13 14:28:54 EDT 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.
--
Stand Fast,
tjg.
More information about the Python-list
mailing list