(s)
return dp[n - 1]
:type s: str
    :rtype: int
:type s: str
    :rtype: int
: type s : str : rtype : int
def decoding_ways(s):
    """
    :type s: str
    :rtype: int
    """
    if not s: return 0
    n = len(s)
    dp = [0] * n
    dp[0] = 1 if s[0] != '0' else 0
    for i in range(1, n):
        if 10 <= int(s[i - 1:i + 1]) <= 26:
            dp[i] += dp[i - 2] if i >= 2 else 1
        if s[i] != '0':
            dp[i] += dp[i - 1]
    return dp[n - 1]
def decoding_ways ( s ) : if not s : return 0 n = len ( s ) dp = [ 0 ] * n dp [ 0 ] = 1 if s [ 0 ] != '0' else 0 for i in range ( 1 , n ) : if 10 <= int ( s [ i - 1 : i + 1 ] ) <= 26 : dp [ i ] += dp [ i - 2 ] if i >= 2 else 1 if s [ i ] != '0' : dp [ i ] += dp [ i - 1 ] return dp [ n - 1 ]