Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #coding:utf-8
- #文字列をリストにしない場合
- import random
- def makestr(num):
- s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789[]{}!$%&'()-^¥:;*+><"
- string = ""
- for i in range(num):
- x = random.randint(0,len(s)-1)
- string += s[x]
- print string
Add Comment
Please, Sign In to add comment