Yes, that particular post should be marked as abusive and the code replaced by.
print("We have a problem, a is equal to b")
Assuming that indeed the code is dealing with a situation where a==b is a problem. Would need the whole question and answer to know for sure. I don't even know what language is that. No semicolon at the end?
There are plenty of good reasons to include curse words. In example, when writing a verifier for Mexico's RFC Codes the documentation for such codes states that 40 combinations are not allowed, like CACA or way worse. You can't write clear code for that without including those rude words. Let those be.
So, gratuitous cursing not integral to the answer? Edit and or flag. Unavoidable cursing for technical reasons? Let it be.
But I'd like to also answer a related question. Not just when, but who should mark and edit these posts. We should only edit them if we have the technical expertise to write the answer/question ourselves. Otherwise, how can we differentiate something which is a technical requirement from something which is not? There may be cases where even not having the expertise we can tell that such abusive language is not needed because it is so blatant. But event in such case it is sensible to try getting help from someone in Discord.