Skip to content

Instantly share code, notes, and snippets.

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 zxkletters/6682650 to your computer and use it in GitHub Desktop.
Save zxkletters/6682650 to your computer and use it in GitHub Desktop.
### 随机生成大写字母和数字组成的字符串
6U1S75
4Z4UKK
U911K4
解决:
import string, random
''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(N))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment