Value = max ([ i for i in ListName if i <= ThresholdValue ])
NumIndex = len ([ i for i in ListName if i <= ThresholdValue ])
ThresholdValue: 用于判断的阈值
ListName:升序排列的列表
Value:不大于该阈值的最大值
NumIndex:上述最大值在列表中的位置
Value = max ([ i for i in ListName if i <= ThresholdValue ])
NumIndex = len ([ i for i in ListName if i <= ThresholdValue ])
ThresholdValue: 用于判断的阈值
ListName:升序排列的列表
Value:不大于该阈值的最大值
NumIndex:上述最大值在列表中的位置