unless statement in python
<p>Is there an equivalent to the unless statement in Python? I do not want to append a line to a label if it has <code>p4port</code> in it.</p>

<pre><code>for line in newLines:
    if 'SU' in line or 'AU' in line or 'VU' in line or 'rf' in line  and line.find('/*') == -1:
        lineMatch = False
    for l in oldLines:
        if '@' in line and line == l and 'p4port' not in line:
            lineMatch = True
            line = line.strip('\n')
            line = line.split('@')[1]
            line = line + '&lt;br&gt;\n'
            labels.append(line)
    if '@' in line and not lineMatch:
        line = line.strip('\n')
        line = line.split('@')[1]
        line="&lt;font color='black' style='background:rgb(255, 215, 0)'&gt;"+line+"&lt;/font&gt;&lt;br&gt;\n"
        labels.append(line)
</code></pre>

<p>Syntax error</p>

<pre><code>   if '@' in line and not lineMatch:
   UnboundLocalError: local variable 'lineMatch' referenced before assignment
</code></pre>
