Integers with leading zeroes
Gregory Ewing
greg.ewing at canterbury.ac.nz
Fri Jul 24 02:23:09 EDT 2015
Michael Torrie wrote:
> A credit card number is indeed a number, and there are
> mathematical formulas for determining if a particular number is a valid
> (as in well-formed) credit card number,
If you're talking about the check-digit algorithm,
that doesn't treat the whole number as an integer,
it works on the individual digits:
http://www.datagenetics.com/blog/july42013/
> and possibly to identify what kind of card it is.
That's determined by the leading digits, and can
be done just as well by treating them as characters.
--
Greg
More information about the Python-list
mailing list