As a fairly active user in the python tag, I agree with you here. Questions such as these are broad and should be closed as such. They should be down-voted and, if the question asker doesn't improve their question, deleted. And in a perfect world, this would all happen.
Of course, that's not what happens. Questions such as these garner 3-4 up votes and many quick, one-line answers. That's not to say this is what always happens. Sometimes I also see questions such as these handled correctly. But more often than not, the former takes place.
I believe this isn't limited to the python tag either. As other users have said, this behavior seems to affect many other language communities as well. Also, this shouldn't just apply to input/output questions, albeit they are probably the most common. This applies to any low quality question that shows no effort or research from the OP.
Why though? Why do people choose to answer questions such as these regardless of the quality or detriment to the site? Obviously there is no one reason, but I believe the most common are:
- Easy to answer / Greed (for points and/or badges).
- They're interesting.
- Ignorance.
Although some reasons are better than others, according to the quality rules and standards for Stack Overflow, they're still wrong and low-quality questions such as those shouldn't be answered.
But as much as I hate to say this, I believe this kind of behavior is ingrained into the Stack Overflow community as a whole. Those questions are now the norm, and accepted. And answering such questions is no longer consider inappropriate. In fact, sometimes users are even rewarded.
I'm not saying this as Mr. Perfect though. I'm guilty of sometimes answering question such as these too. In fact, these kinds of questions were my bread and butter when I was first starting out. They gave me confidence in my abilities, increased my knowledge of Python, and helped grow my reputation.
But I've been trying to do better. Even though it's been hard, I've started to vote to close and down-vote such questions, rather than following my natural urge to fire up a REPL session and post a quick answer. And if I do find a question that I find interesting and just can't pass up answering, I've started trying to work with the OP to polish their question into shape.
I don't think We'll ever be able to get rid of this kind of behavior. It's simply too common and, as I said above, hard-wired in the Stack Overflow community. Now all of this is not to say I'm a strict rule follower. If an answer to a question such as the one you posted is correct, useful, answers a common question, and explains the solution(s) they posted, then I'm willing to give some leeway and sometimes even up-vote. But for most of the questions I see, this simply isn't the case. And the correct course of action is to follow the standard procedure: down-vote, and vote to close.
I do plan to start doing more of that. But if we really want to minimize this problem and keep it at bay, then we'll need other high-rep users who are leaders in their respective tags to get on board and help as well.