Files
WPIQ/wo/core/random.py

13 lines
314 B
Python
Raw Normal View History

2019-09-19 14:07:34 +02:00
import random
import string
class RANDOM:
2019-10-01 04:08:54 +02:00
"""Random strings generator"""
2019-09-19 14:07:34 +02:00
2019-10-01 04:08:54 +02:00
def gen(self, length='24'):
2019-09-19 14:07:34 +02:00
short_random = ''.join([random.choice
(string.ascii_letters + string.digits)
2019-10-01 04:08:54 +02:00
for n in range(length)])
2019-09-19 14:07:34 +02:00
return short_random