A Python newbie ask a simple question
jeff at jmcneil.net
Fri Jul 13 20:51:52 CEST 2007
The raw_input built-in returns a string. The '' subscript returns
the first character in the user supplied response as strings support
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> mystr = "asdf"
>>> raw_input("Another one, please: ")
Another one, please: ASDF
On 7/13/07, xing93111 at gmail.com <xing93111 at gmail.com> wrote:
> what does the statement "choice = raw_input(prompt)" mean? I don't
> know why there is a '' in the statement.
> Thank you very much
More information about the Python-list