IBAN: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 2,380: | Line 2,380: | ||
def isValidIBAN(iban: string) -> bool: |
def isValidIBAN(iban: string) -> bool: |
||
let s = strip(uppercase(iban)) |
|||
if s.length == ccToLen(s): |
|||
return rotmod97(s) == 1 |
|||
else: |
|||
return false |
|||
assert isValidIBAN("GB82 WEST 1234 5698 7654 32") |
assert isValidIBAN("GB82 WEST 1234 5698 7654 32") |