Agentic AI - Agent Safety and Guardrails
Which Python code snippet correctly determines if any banned word from the list
banned_words appears in the variable output?banned_words appears in the variable output?banned_words is present in output.any() with a generator expression checking membership of each word in output, which is correct.output is in the list banned_words, which is the reverse.banned_words is in output, which is invalid.contains on a string.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions