Note that the first tag isn’t a deep learning tag, yet the questions are deep learning questions.
So why does your function have this behavior? This happens because when a function first encounters a return statement, it will immediately quit the function. I have explained this in a different context here (specifically in the section Technical Preamble).
Oh wow!!! The link to your technical answer to a related question is phenomenal!
I see. We want to make a conclusion on the whole list of tags (i.e., detect at least one instance of a deep-learning word). Whereas how I have it, it evaluates on a single tag, then stops. As you pointed out in the dataframe above, it evaluated python as 0 then stopped. Versus examining the whole list of [python, deep-learning, tensorflow, numpy].