Re:Numbers 0 to 11111 in terms of Increasing and Decreasing ...
by adtac on Wednesday January 11, 2017 @03:41AM
(#13372608)
Ugh, fixed it.
Using * * is not really an option now because it takes insane amounts of time to compute something like `123456789`.
And this is just a tiny script - `eval` shouldn't really be an issue. And yes, I know it's evil, generally. But if you think about it, Python itself is just one big eval loop :P
"^" is the XOR operator. GP's code has that bug.
> That eval() function sure smells suicidal for anything remotely serious though.
Yes, ast.literal_eval() should be used.