Bash If String Contains Multiple Substrings In Python