Can there be a faster and efficient way of restructuring the following code
def g(i): if(0>=i<1): return \'0-1\' if(1>=i<2): return \'