On 7/23/2011 3:42 AM, Chris Angelico wrote:

int(s.rstrip('0').rstrip('.'))


Also, it will (in?)correct parse strings such as:

'165............00000000000000'

to 165.

--
Bill
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to