小敏想用二分法对关键字14进行查找,请你帮她补全代码
lst=[3,12,7,45,9,10,31,90,1,23,14,52] ① key=14 n=len(a) i,j=0,n-1 flag=-1 while ② : mid=(i+j)//2 if key==a[mid]: flag=mid break elif key>a[mid]: ③ else: j=mid-1 if ④ : print(str(key)+'没找到!') else: print(str(key)+'已找到!')