def intranges_contain(int_, ranges):
 tuple_ = (int_, int_)
 pos = bisect.bisect_left(ranges, tuple_)
 if (pos > 0):
  (left, right) = ranges[(pos - 1)]
  if (left <= int_ < right):
   return True
 if (pos < len(ranges)):
  (left, _) = ranges[pos]
  if (left == int_):
   return True
 return False

def intranges_contain ( int_ , ranges ) : tuple_ = ( int_ , int_ ) pos = bisect . bisect_left ( ranges , tuple_ ) if ( pos > 0 ) : ( left , right ) = ranges [ ( pos - 1 ) ] if ( left <= int_ < right ) : return True if ( pos < len ( ranges ) ) : ( left , _ ) = ranges [ pos ] if ( left == int_ ) : return True return False
determine if int_ falls into one of the ranges in ranges .