python while循环中,列表报错超出索引范围

想通过二分法求出列表中的55,可是提示索引超出范围,请问是为什么啊?

img

test_list = [1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77] #初始列表
site = len(test_list) // 2 #列表中间位置
count = 0 #计数
while test_list != [55]: #不等于55时就一直循环运行
    if test_list[site] < 55:
        test_list = test_list[site:] #中间值小于55,就取test_list[site]后面的列表
        count += 1 #计数加1
    elif test_list[site] > 55:
        test_list = test_list[:site]
        count += 1
    else:
        count += 1
print(test_list)
print(f"第{count}次找到了55")

测试程序运行正常,没有出现索引越界问题啊,输出了第一次找到了55.

请把你if,while后面的==[?]的中括号去掉