I am able to use UpdateCursor to find and delete rows if a field contains part of a string (code below works). Now I want to do the opposite--if part of this string is not in my field, I want to delete the row. Is there a "not_in" function/syntax?
with arcpy.da.UpdateCursor(mySHP, ['OID@', 'Comments']) as cursor:
for row in cursor:
if 'this phrase' in row[1]:
cursor.deleteRow()