#!/usr/bin/python2.7
import random, string, sys
length=10
if len(sys.argv)>1:
length=sys.argv[1]
rand_str = ''.join(random.choice(
string.ascii_lowercase
+ string.ascii_uppercase
+ string.digits)
for i in range(int(length)))
print rand_str
No comments:
Post a Comment