代码如下:
#encoding=utf-8
print '中国'
#在排序已经完成的序列中查找元素
import bisect #检查x是否在L中,如果L已经排序
L=[]
x_insert_point=bisect.bisect_right(L, 300)
print x_insert_point
print L[x_insert_point-1:x_insert_point]==300
print L and L[x_insert_point-1]==300
打印结果如下:
中国
3
False
False