# 产生任意长度随机字符串

Source: https://blog.ferstar.org/posts/generate-arbitrary-length-random-string/






从`stackoverflow`扒的, 比较常用的一个功能
```python
import random
import string

def id_generator(size=8, chars=string.ascii_letters + string.digits):
    return ''.join(random.choice(chars) for _ in range(size))
    
print(id_generator())
```

