(c)
maps hexadecimal class value (string) to a decimal number
    returns:
    - 0 through 9 for classes representing respective numbers
    - 10 through 35 for classes representing respective uppercase letters
    - 36 through 61 for classes representing respective lowercase letters
maps hexadecimal class value (string) to a decimal number
    returns:
    - 0 through 9 for classes representing respective numbers
    - 10 through 35 for classes representing respective uppercase letters
    - 36 through 61 for classes representing respective lowercase letters
maps hexadecimal class value ( string ) to a decimal number returns : - 0 through 9 for classes representing respective numbers - 10 through 35 for classes representing respective uppercase letters - 36 through 61 for classes representing respective lowercase letters
def relabel_class(c):
    '''
    maps hexadecimal class value (string) to a decimal number
    returns:
    - 0 through 9 for classes representing respective numbers
    - 10 through 35 for classes representing respective uppercase letters
    - 36 through 61 for classes representing respective lowercase letters
    '''
    if c.isdigit() and int(c) < 40:
        return (int(c) - 30)
    elif int(c, 16) <= 90: # uppercase
        return (int(c, 16) - 55)
    else:
        return (int(c, 16) - 61)
def relabel_class ( c ) : if c . isdigit ( ) and int ( c ) < 40 : return ( int ( c ) - 30 ) elif int ( c , 16 ) <= 90 : # uppercase return ( int ( c , 16 ) - 55 ) else : return ( int ( c , 16 ) - 61 )