Is there any driver expression for elif statement?
Nest the ternary conditional operator

(var + 3.5) if var &gt; 0 else (var - 3.5) if var &lt; 0 else 1


or for more detailed scripts

import bpy

def x(var):
    if var &gt; 0:
        return var + 3.5
    elif var &lt; 0:
         return var - 3.5
    else:
         return 1

bpy.app.driver_namespace["x"] = x


And then use x(var) as your driver expression.