Newbie question - leading zeros

eldorado eldorado at
Fri Oct 13 20:53:34 CEST 2006

On Fri, 13 Oct 2006, Rainy wrote:

> eldorado 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
>> --
>> Randomly generated signature
>> ICMP: The protocol that goes PING!
> import string
>>>> string.lstrip('0001', '0')
> '1'
> Hope this willhelp

Perfect.  Thank you and everyone else who answered.

Randomly generated signature
u grammar nazis can bite me ass.

More information about the Python-list mailing list