That code was a strange mix of 1/2 Python and 1/2 Javascript.<p>The Python document points out that input() is the same as eval(raw_input()) but you have to know from something other than the library reference that 'eval()' is a potentially dangerous function.<p>Python 3.x's has only "input", which is the same as Python 2.x's "raw_input". See <a href="http://www.python.org/dev/peps/pep-3111/" rel="nofollow">http://www.python.org/dev/peps/pep-3111/</a> .