Python‎ > ‎string constants‎ > ‎

string.hexdigits

http://www.adilwaseem.com/

Introduction
Return with digital number from 0 to 9, alphabets from a to f in lower and uppercase.

Syntax
string.hexdigits

Parameters
None

Examples
The method equivalent to:
>>> string.hexdigits
'0123456789abcdefABCDEF'
>>>

The str.isalnum() to check the validity of the value.
 >>> import string
>>> string.hexdigits
'0123456789abcdefABCDEF'
>>> x=string.hexdigits
>>> x
'0123456789abcdefABCDEF'
>>> x.isalnum()
True



Comments