def run_cmds(cmds, fail_sequential=False):
 to_return = True
 for (cmd, tries) in cmds:
  if ((not to_return) and fail_sequential):
   return False
  elif run_cmd(cmd, attempts=tries):
   continue
  else:
   to_return = False
 return to_return

def run_cmds ( cmds , fail_sequential = False ) : to_return = True for ( cmd , tries ) in cmds : if ( ( not to_return ) and fail_sequential ) : return False elif run_cmd ( cmd , attempts = tries ) : continue else : to_return = False return to_return
run a list of tuples .