SolarEnergy/python_device/src/utils.py

9 lines
169 B
Python

import string
import random
def rand_str(len: int) -> str:
return "".join(
random.choice(string.ascii_uppercase + string.digits) for _ in range(len)
)