numeric()
function
The numeric()
function is used to generate a random integer.
Syntax
Basic
Will return a 6-digit long integer
strig.numeric() # Example output: 482937
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
length | int | 6 | The number of digits in the generated random integer. |
prefix | int | None | A number to add at the beginning of the generated integer. This will be concatenated to the generated digits, increasing the overall length of the result. |