def verify(isbn):
    nums = []
    
    for i in isbn:
        print(str(i))
        try:
            if i == '-':
                continue
            elif i == ('X' or 'x'):
                if len(nums) != 9:
                    return False
                nums.append(10)
            else:
                nums.append(int(i))
        except:
            return False

    if len(nums) != 10:
        return False
    
    result = 0

    for i in range(10):
        result += nums[i] * (i + 1)
        print("nums = " + str(nums[i]), end='')
        print("; nums * i = " + str(nums[i] * (i + 1)), end='')
        print("; i = " + str(i), end='')
        print("; result = " + str(result))
        
    final = result % 11

    print(str(final == 0))

    return (result % 11 == 0)

86d48ed6493ed08c2ea9116102f83b0c30a1abe5
<mask token>

def verify(isbn):
    nums = []
    for i in isbn:
        print(str(i))
        try:
            if i == '-':
                continue
            elif i == ('X' or 'x'):
                if len(nums) != 9:
                    return False
                nums.append(10)
            else:
                nums.append(int(i))
        except:
            return False
    if len(nums) != 10:
        return False
    result = 0
    for i in range(10):
        result += nums[i] * (i + 1)
        print('nums = ' + str(nums[i]), end='')
        print('; nums * i = ' + str(nums[i] * (i + 1)), end='')
        print('; i = ' + str(i), end='')
        print('; result = ' + str(result))
    final = result % 11
    print(str(final == 0))
    return result % 11 == 0

def verify(isbn):
    nums = []
    
    for i in isbn:
        print(str(i))
        try:
            if i == '-':
                continue
            elif i == ('X' or 'x'):
                if len(nums) != 9:
                    return False
                nums.append(10)
            else:
                nums.append(int(i))
        except:
            return False

    if len(nums) != 10:
        return False
    
    result = 0

    for i in range(10):
        result += nums[i] * (i + 1)
        print("nums = " + str(nums[i]), end='')
        print("; nums * i = " + str(nums[i] * (i + 1)), end='')
        print("; i = " + str(i), end='')
        print("; result = " + str(result))
        
    final = result % 11

    print(str(final == 0))

    return (result % 11 == 0)
