Integers with leading zeroes

Gregory Ewing greg.ewing at
Fri Jul 24 08:23:09 CEST 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:

> 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.


More information about the Python-list mailing list