def extract_range(s):
    """ Extract range from string"""
    ranges = s.split(',')
    if len(ranges) > 1:
        return int(ranges[0]), int(ranges[1])
    else:
        return int(ranges[0]), None
