def change_sequence(seq, action, seqno=_Unspecified, cond=_Unspecified):
 for i in range(len(seq)):
  if (seq[i][0] == action):
   if (cond is _Unspecified):
    cond = seq[i][1]
   if (seqno is _Unspecified):
    seqno = seq[i][2]
   seq[i] = (action, cond, seqno)
   return
 raise ValueError('Action not found in sequence')

def change_sequence ( seq , action , seqno = _Unspecified , cond = _Unspecified ) : for i in range ( len ( seq ) ) : if ( seq [ i ] [ 0 ] == action ) : if ( cond is _Unspecified ) : cond = seq [ i ] [ 1 ] if ( seqno is _Unspecified ) : seqno = seq [ i ] [ 2 ] seq [ i ] = ( action , cond , seqno ) return raise ValueError ( 'Action not found in sequence' )
change the sequence number of an action in a sequence list .