User Input

MRAB python at mrabarnett.plus.com
Thu May 30 08:08:25 EDT 2013


On 30/05/2013 12:48, Eternaltheft wrote:
> On Thursday, May 30, 2013 7:33:41 PM UTC+8, Eternaltheft wrote:
>> Hi, I'm having trouble oh how prompt the user to enter a file name
>> and how to set up conditions. For example, if there's no file name
>> input by the user, a default is returned
>
> Thanks for such a fast reply! and no im not using raw input, im just
> using input. does raw_input work on python 3?
>
In Python 2 it's called "raw_input" and in Python 3 it's called "input".

Python 2 does have a function called "input", but it's not recommended
(it's dangerous because it's equivalent to "eval(raw_input())", which
will evaluate _whatever_ is entered).



More information about the Python-list mailing list