can this be implemented?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Mon Jun 4 00:24:36 EDT 2007
En Sat, 02 Jun 2007 20:54:29 -0300, greenflame <alikakakhel at yahoo.com>
escribió:
> When I first learned about programming, I started with BASIC, QBASIC
> to be more accurate. While I was at that stage, I learned about the
> INPUT command. I used it abundantly.
>
> Ok so now for the actual issue.
>
> I would like to implement something like the INPUT command from BASIC.
> I failed to find something on the python website documentation for
> beginners.
This BASIC program:
INPUT "Your name"; z$
PRINT "Hello, "; z$
would be this in Python:
name = raw_input("Your name? ")
print "Hello,", name
raw_input is a built-in function, see
http://docs.python.org/lib/built-in-funcs.html#l2h-59
--
Gabriel Genellina
More information about the Python-list
mailing list