Skip to content

Instantly share code, notes, and snippets.

@makotoworld
Created December 12, 2011 07:09
Show Gist options
  • Save makotoworld/1465572 to your computer and use it in GitHub Desktop.
Save makotoworld/1465572 to your computer and use it in GitHub Desktop.
9桁のランダムなキーを生成(A-Za-z0-9)
# coding: utf-8
import random
import string
def random_key():
if __name__ == "__main__":
message = string.ascii_lowercase + string.ascii_uppercase + string.digits
random_message = "".join([message[random.randrange(0, len(message)-1)] for cnt in range(9)])
print random_message
random_key()
@makotoworld
Copy link
Author

A-Z(26)+a-z(26)+0-9(10)=62
62C9=62_61_60_59_58_57_56_55_54_53/10_9_8_7_6_5_4_3_2_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment