Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 2
    Don't estimate the ingenuity of fools... and clever attackers. A DOS attack would be easiest for this sort of thing, but others may be possible. Commented Apr 28, 2019 at 2:53
  • Can we use the new "walrus" operator instead of redundant inputs? Is it also a poor style? Commented Apr 16, 2020 at 7:52
  • 1
    @JArunMani I don't think it would be poor style, but might be a little less readable. You will indeed have only one input per loop and the loop will become very short, but the condition might become pretty long... Commented May 9, 2020 at 8:40
  • could you specify the license of this to be public domain or MIT (or even specify in your profile), so noone has to worry about the cc license which does not allow for use in non-cc works? Commented Jul 23, 2020 at 23:34
  • 6
    @laundmo,certainly I release the code blocks that I wrote into the public domain. Feel free to use them in any context, without my explicit permission or knowledge. Regarding the non-code-block segments, If you want to paste my entire answer into a "Learn Python" book you're writing, let's talk royalties ;-) Commented Jul 24, 2020 at 13:50