Last active
March 20, 2023 04:05
-
-
Save xiaoyu2006/309f2833ce7b7ebc8fff2e748a70a29a to your computer and use it in GitHub Desktop.
Check if a string is bad.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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