random
random¶
The random library provides utilities for generating random values of different types.
It is useful for simulations, testing, games, unique identifiers, and dynamic content generation.
random is available through the Libs instance.
Random Integer¶
Generate a random integer within a range.
This returns a number between 1 and 10.
Random String¶
Generate a random string with custom length and character set.
This generates an 8-character alphabetic string.
Random Date¶
Generate a random date within a given range.
Random Color¶
Generate a random color value.
Notes¶
- Supports numbers, strings, dates, and colors
- Useful for games, testing, and mock data
- No setup required