>>> def test1(value):
... if value < 0:
... print('value is -1 or lower')
... elif value < 1:
... print('value is 0') # lower values are delt with by the first if statment
...
>>> test1(-1)
value is -1 or lower
>>> test1(0)
value is 0
>>> test1(1)
>>>
The below is more readable, especially at a glance and gives the same results
>>> def test2(value):
... if value == -1:
... print('value is -1')
... elif value == 0:
... print('value is 0')
...
>>> test2(-1)
value is -1
>>> test2(0)
value is 0
>>> test2(1)
>>>