โ€” Docs

random.string

Generates a random string.

Note

The result is generated using the cryptographically secure random number generator.

Syntax

string(length, alphabet?)

Parameters

Return value

A random string.

Example

random.string(10)
"n6McPqrPH4"
random.string(3, "๐ŸŽ๏ธ๐Ÿ๏ธ๐Ÿšฒ๐Ÿšƒโœˆ๏ธ๐Ÿš€๐Ÿšข")
"๐Ÿšฒ๐Ÿš€๐Ÿšฒ"