containsBanned should return True if either of its helper functions returns True, not just if both do. This means it's currently letting through titles with "Historic District" that don't also have a banned word. To fix this, I just changed "and" to "or" in the return statement.
containsBanned
should return True if either of its helper functions returns True, not just if both do. This means it's currently letting through titles with "Historic District" that don't also have a banned word. To fix this, I just changed "and" to "or" in the return statement.