Skip to content

Instantly share code, notes, and snippets.

@seathief
Created May 23, 2017 06:15
Show Gist options
  • Save seathief/5ec4e9ac3563854fbbea7433bceaa4d3 to your computer and use it in GitHub Desktop.
Save seathief/5ec4e9ac3563854fbbea7433bceaa4d3 to your computer and use it in GitHub Desktop.
簡易身份證產生器
import string
import random
def idno_generator():
'''
credit goes to
https://stackoverflow.com/questions/2257441/random-string-generation-with-upper-case-letters-and-digits-in-python
'''
return random.choice(string.ascii_uppercase) + ''.join(random.choice(string.digits) for _ in range(10))
print('\n'.join(idno_generator() for _ in range (30000)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment