User Input

Fábio Santos fabiosantosart at gmail.com
Thu May 30 08:10:53 EDT 2013


On 30 May 2013 12:58, "Eternaltheft" <eternaltheft at gmail.com> 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?

On python 2, the function to prompt the user for input and return a string
is raw_input.

On python 3 that function has been renamed to input.

However on python 2 input is something else. It also evaluates the input as
a python expression. That makes it unsafe to use in most circumstances.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130530/7a1c138f/attachment.html>


More information about the Python-list mailing list