random.pin

Generates a random PIN: a string containing random digits.

Note

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

Warning

After evaluation, the codebook is saved to the disk. Therefore, the generated PIN will also be stored.

Syntax

pin(length?)

Parameters

Return value

A string containing a random PIN.

Example

random.pin()
"523247"
random.pin(4)
"1983"