Functions
Alphanumeric

alphanumeric() function

The alphanumeric() function is used to generate a random string composed of alphabetic characters and numbers.

Syntax

Basic

Will return a 6 character long string of letters and numbers

strig.alphanumeric() # Example output: 'a3D9fB'

Parameters

ParameterTypeDefaultDescription
lengthint6The length of the generated random string.
prefixstr""A string to add at the beginning of the generated string. This will add to the length of the generated string.
casestrNoneDetermines the letter case. Possible values are "upper" (only uppercase letters and numbers), "lower" (only lowercase letters and numbers), or None (mix of both uppercase and lowercase letters, along with numbers).