For Python programming I would say 100% of the time you should look the answer up in the official manual for a well-defined problem (delete a file) because the manual is correct, well-written, etc. It's astonishing how often Google and Bing snatch defeat from the jaws of victory on queries like this. If you go looking in splogs, spam overflow and other spam sites at best you are going to get wrong answers, at worse y…
It's also verbose and requires effort and working memory to parse, when I could get a trivial one line answer or code snippet from a stackoverflow post specific to my question. Yes, in an ideal world we would all read the manual, but unfortunately manuals are inconvenient. And in my experience the vast majority of stackoverflow answers are correct.