Skip to content

Instantly share code, notes, and snippets.

@xiaoyu2006
Last active March 20, 2023 04:05
Show Gist options
  • Save xiaoyu2006/309f2833ce7b7ebc8fff2e748a70a29a to your computer and use it in GitHub Desktop.
Save xiaoyu2006/309f2833ce7b7ebc8fff2e748a70a29a to your computer and use it in GitHub Desktop.
Check if a string is bad.
def is_str_bad(s):
s = s.lower()
r = False
r |= (s.find("political") != -1)
r |= (s.find("politics") != -1)
r |= (s.find("politically") != -1)
return r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment