I don't know about other tags, but unfortunately in the python tag there are a handful of high-rep users who jump on all sorts of basic spoon-feeding questions. Call them eager-to-please if you're Being Nice, or repfarmersrepwhfarmers otherwise.
Another aspect is that python is in many places taught as a first language, so there are so many egregious questions that it's a sight for sore eyes if someone can post their code request in a clearly explained way. I think this leads to an unreasonable number of upvotes on otherwise suboptimal questions.
Finally, most of these questions have really simple, few-line solutions. Even if there would be an appropriate duplicate, many people will just throw in an answer and not bother trying to vote to close.
I personally believe that the way to maintain a high signal-to-noise ratio on SO is to put our feet down and refuse to answer questions that show little to no effort and essentially want us to write the askers code. Allowing these posts through will signal to further newbies that such questions are fine. I've on multiple occasions heard from lazy askers that their question was fine since "this other question [link] is also upvoted and answered". That's exactly what we don't want.
So with the above considerations in mind I vote for ruthless peer pressure. Many users have seen me downvote otherwise good answers, and leaving a comment that answering questions like this is not helpful. Some users are open to such feedback and will try to adjust their behaviour, some don't. They often comply in the specific post where I call them out, but carry on with their activities on new questions. Note that I usually only downvote answers of this kind that would've fit in a comment.
One problem with handling these posts is that some necessary actions are somewhat against official site mechanics. I downvote answers that I feel are harmful for the site in the long run, and many people disagree with my assessment that "this answer is not useful" covers this case. On very basic questions I sometimes answer in a comment, because that's more than enough space. This again conflicts with the general guideline of not answering in comments. But giving full answers to trivial or effortless or RTFM questions will hinder roomba and lead to the impression that Stack Overflow can be used as a tutorial site. This is most certainly not the case and this is not something we would want to happen.
Also note that using "too broad" as a reason for closing simple code requests is again something that is not officially recorded, and many users frown upon.