Skip to content

Instantly share code, notes, and snippets.

@mschmitt
Last active June 7, 2022 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mschmitt/d778e73a5c410573d6e5cc2cf552b195 to your computer and use it in GitHub Desktop.
Save mschmitt/d778e73a5c410573d6e5cc2cf552b195 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
# https://mastodon.online/@unixtippse/108437781336003434
from schwifty import IBAN
from maskprocessor import maskprocessor
masked_iban='DE0210010010000682?d?d?d?d'
for an_iban in maskprocessor(masked_iban):
try:
iban=IBAN(an_iban, validate_bban=True)
except:
pass
else:
print(iban)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment