"Mahesh N" <[EMAIL PROTECTED]> wrote
> PS : I understand that i can do type conversion after getting input > thru > raw_input(). But how does input() function work? > >>>> prompt="temme a number\n" >>>> speed =input(prompt) > > Traceback (most recent call last): > File "<pyshell#56>", line 1, in <module> > speed =input(prompt) > TypeError: 'str' object is not callable This suggests that you have a variable somewhere called input that is hiding the function. Try doing del(input) and try it again. As to what input does; it evaluates whatever string you give to it so if your user types in some malicious Python code input will execute it. For that reason input is usually frowned on as a security risk and int(raw_input()) is preferred. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor