def getinrangelist(inputlist,minval,maxval):
    """creates a binary list, indicating inputlist entries are
between (inclusive) the minval and maxval"""
    inrangelist=[1 if maxval>=i>=minval else 0
                 for i in inputlist]
    return inrangelist