In Python there is not a switch/case statement, however this can be worked round using nested if..elif..else comands.
var = "aa" if var in ( "a", "aa", "aaa" ) : print "it is a kind of a "; elif var in ( "b", "bb", "bb" ) :print "it is a kind of b "; else : print "it is something else ";
Using for loops
suite = ecflow.Suite("x") previous = 0 for i in (0,6,12,18,24) : fam = suite.add_family(str) if i != 0 : fam.add_trigger("./" + previous + " == complete ") fam.add_task("t1") fam.add_task("t2").add_trigger("t1 == complete") previous = str