Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save teebu/97ba1cdf4eb01474edcc0ef1d622eb76 to your computer and use it in GitHub Desktop.
Save teebu/97ba1cdf4eb01474edcc0ef1d622eb76 to your computer and use it in GitHub Desktop.
from random import randint
def generate_fr_vat():
siren = randint(100000000, 999999999)
key = (12 + 3 * (siren % 97)) % 97
return 'FR' + str(key) + str(siren)
print(generate_fr_vat())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment