2 ms·
His postscript is a debatable improvement, as input() in Python 2.x (which was what the article was written using) actually evaluates the input as a Python expr
by tomku 15y ago
His postscript is a debatable improvement, as input() in Python 2.x (which was what the article was written using) actually evaluates the input as a Python expression before storing it. It's equivalent to wrapping the input functions that the other languages use in eval(), which is (imo) a very, very bad practice to teach unless you're asking your students to write a REPL.
- aroberge 15y agoYes, he should have been using raw_input().