def sum67_loop(nums):
    """
    A basic loop method. the key is to keep a flag
    set to know whether a 6 has been encountered
    """
    total = 0
    is6 = False
    for num in nums:
        print("adding:", num, is6)
        if num == 6 or is6:
            is6 = True
        else:
            total += num
        if num == 7:
            is6 = False
    return total