ecFlow's documentation is now on readthedocs!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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 ";
  • No labels