Integers with leading zeroes

Laura Creighton lac at openend.se
Wed Jul 22 09:12:59 CEST 2015


The biggest use I have for decimal numbers that begin with 0 is in
credit card numbers, account numbers and the like where the first
check you do is 'does this thing have the correct number of digits'.
So far, all the examples I've been able to find in my code -- which
does this sort of stuff a lot -- is looking at string versions of
decimal numbers, but I suspect there is old code out there in the
wild which just used integers.

Laura



More information about the Python-list mailing list