Re: question on "input"
- From: Bill Mill <bill.mill@xxxxxxxxx>
- Date: Tue, 12 Jul 2005 10:39:25 -0400
On 12 Jul 2005 07:31:47 -0700, b83503104@xxxxxxxxx <b83503104@xxxxxxxxx> wrote:
> Hi,
>
> I want to accept the user's answer yes or no.
> If I do this:
>
> answer = input('y or n?')
Use raw_input instead:
>>> answer = raw_input("y or n?")
y or n?y
>>> answer
'y'
Check out the documentation of both functions at
http://docs.python.org/lib/built-in-funcs.html for more details.
<snip>
Peace
Bill Mill
.
- References:
- question on "input"
- From: b83503104@xxxxxxxxx
- question on "input"
- Prev by Date: Re: append one file to another
- Next by Date: Re: breaking out of nested loop
- Previous by thread: Re: Who uses input()? [was Re: question on "input"]
- Next by thread: Help with inverted dictionary
- Index(es):
Relevant Pages
|