<garvit244>91_1.py
def numDecodings( s):
    if not s or s[0] == '0':
        return 0
    if len(s) == 1:
        return 1
    
    dp = [0]*len(s)
    dp[0] = 1
    
    if int(s[:2]) > 26:
        if s[1] != '0':
            dp[1] = 1
        else:
            dp[0] = 0
    else:
        if s[1] != '0':
            dp[1] = 2
        else:
            dp[1] = 1
    
    for index in range(2, len(s)):
        if s[index] != '0':
            dp[index] += dp[index-1]
    
        val = int(s[index-1:index+1])
        if val >= 10 and val <= 26:
            dp[index] += dp[index-2]
    return dp[len(s)-1]
def sample_funcname ( var_0 ) :
    if not var_0 or var_0 [ 0 ] == '0' :
        return 0
    if len ( var_0 ) == 1 :
        return 1
    var_5 = [ 0 ] * len ( var_0 )
    var_5 [ 0 ] = 1
    if int ( var_0 [ : 2 ] ) > 26 :
        if var_0 [ 1 ] != '0' :
            var_5 [ 1 ] = 1
        else :
            var_5 [ 0 ] = 0
    else :
        if var_0 [ 1 ] != '0' :
            var_5 [ 1 ] = 2
        else :
            var_5 [ 1 ] = 1
    for var_10 in range ( 2 , len ( var_0 ) ) :
        if var_0 [ var_10 ] != '0' :
            var_5 [ var_10 ] += var_5 [ var_10 - 1 ]
        var_11 = int ( var_0 [ var_10 - 1 : var_10 + 1 ] )
        if var_11 >= 10 and var_11 <= 26 :
            var_5 [ var_10 ] += var_5 [ var_10 - 2 ]
    return var_5 [ len ( var_0 ) - 1 ]
