Python has a particularly strong idiom built around the idea that, "there should be one—and preferably only one—obvious way to do it".
Here are some recent, well-received questions that illustrate the issue. If these appeared in other language tags, I suspect that they would be quickly closed.
- This works, but is there some reason I shouldn't do it? Is it pythonic? Is there a better way to do it?
- Is there a pythonic way (without loops) to get a new list where each element is repeated N times?
Requests for "the best way" are necessarily opinion-based, but since the topic is a core feature of the language, do such requests fall in the "Good Subjective" category or should they be closed as "primarily opinion-based?" Is there a known metric to determine the pythonicity of code beyond community consensus?