def toggle_actions(actions, enable):
 if (actions is not None):
  for action in actions:
   if (action is not None):
    action.setEnabled(enable)

def toggle_actions ( actions , enable ) : if ( actions is not None ) : for action in actions : if ( action is not None ) : action . setEnabled ( enable )
enable/disable actions .