This Python script implements the Luhn algorithm for calculating or verifying checksums.
luhn(query, verify=False):
Calculates or verifies the Luhn checksum for a given number. Returns True for valid checksum, False otherwise.
checksum = luhn(query)
checksum_ verified = luhn(query, verify=True)