mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
8 lines
230 B
Python
8 lines
230 B
Python
|
import random
|
||
|
|
||
|
|
||
|
# Return a random string of 6 letter/digits.
|
||
|
def random_token(length=6) -> str:
|
||
|
return "".join(
|
||
|
[random.choice('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') for x in range(length)])
|