class MyRange(object):

    def __init__(self, start, end, value):
        self.start = start
self.end = end
self.value = value

def has_in_range(self, num):
    return self.start <= num <= self.end
How to keep ranges with python?