The Luhn algorithm or Luhn formula, is a simple formula used to validate a variety of identification numbers, such as credit card numbers. Here is my implementation written in Python:

def checkDigit(digits):
digitList = []
digitOdd = []
checksumOdd = 0
[...]

Tags: , , , ,