def interval(li, ls, n, tancat):
    if tancat:
        return li <= n <= ls
    else:
        return li < n < ls
        
