How can I drive the Switch nodes True/False value?
It works for me with the plain Expr: abs(var) &lt; frame. So basically you just need a Boolean expression (omit the if in your expression) for it to drive the Switch. Basically any numerical result below 1.0 will result in Off and starting from 1.0 and above will result in On.

You can put something like (abs(var) &lt; frame) and (abs(var) + var_001 &gt; frame) into the box to evaluate only True during the duration of your Strip after you changed your var_001 to the frame_final_duration.

Furthermore you could Copy'n'Paste drivers if you want to use them again.

When you want to use your own function to add more complicated stuff like conditional expressions, stick to the Example code in the documentation about the Driver Namespace:


  This script will add a function to the driver namespace, which can then be used in the expression driver_func(frame):

import bpy

def driver_func(val):
    return val * val    # return val squared

# add function to driver_namespace
bpy.app.driver_namespace['driver_func'] = driver_func



But giving your variables meaningful names as soon as possible is a good practise... ;-)