import locale and print range on same line

Chris Angelico rosuav at gmail.com
Sat Jan 23 09:53:04 EST 2016


On Sun, Jan 24, 2016 at 1:03 AM, Ramo <raiwil at gmail.com> wrote:
> The reason why I want to have it on onto one line has nothing to do with my question, "why doesn't it work on one line" :)
>
> But if you want to know it, I use this python code in the commandline of a texteditor :)

Called it! :)

It actually has a lot to do with your question, because it puts
special restrictions on the answer. By giving context, you prevent
answers like Steven's that are trying to fix what is thought to be a
faulty assumption; instead, we'll attack the problem as an
intellectual challenge - how can we achieve this goal within these
restrictions? Worded that way, the question will definitely get
responses that aren't what we'd normally call "good code", but they
fit the situation. It's not uncommon to have questions like this,
especially from a security point of view; for instance: "Is it
possible to invoke os.system() without using any builtins or imports,
and without having an underscore anywhere in the code?" (answer: yes,
it is).

ChrisA



More information about the Python-list mailing list