How to ask questions on Stack Overflow?
Before asking my question I have searched through Stack Overflow and found no similar questions. Below is the list of searches I've made:
- Python print command changed my list contents;
- Python changed my list contents after print command;
- Python list contents disappear after print command;
- Does the print command change Python list contents?
- Using Python print command to print a list;
Since I've got no useful result, I asked the question: Unexpected behavior in Python 3: The list contents disappear after printed.
Thanks to ForceBru (answered my question) and Joachim Isaksson (commented it), I could learn and keep coding towards my objective, but my question was downvoted (-1 in my reputation) with the justification that it is a duplicate of Python: calling 'list' on a map object twice .
How could I find that question before posting mine? It did not appear in any of my searches.
I understand Stack Overflow is a place where knowledge is enriched as the ones who know more share their expertise with the ones who know less, and this way the collective knowledge grows and the Stack Overflow knowledge base becomes stronger and more useful, helping a larger community of coders. This only happens if questions are asked and I suppose Stack Overflow's objective is to motivate users to ask questions, so the knowledge gets shared and everybody is happy!
As a Python learner, I have doubts and the biggest one right now is that I don't know how to ask a question without being downvoted.
Besides searching for related questions on Stack Overflow, what are the steps one should take before posting a question?