Weird Problem

Anand Pillai pythonguy at Hotpop.com
Thu Aug 21 14:18:11 EDT 2003


Dont forget that 'input' is a keyword in python.
It is used to accept user inputs as illustrated below.

r=input("Write your name here: ")
print r

Maybe the interpreter is getting confused with 
your variable <input> and the keyword "input".

My suggestion... try a different variable name
other than <input>.

Just guessing of course, since I can find no
problem with the code as such.

-Anand

"Andrew Dalke" <adalke at mindspring.com> wrote in message news:<H8Z0b.1624$Ej6.1006 at newsread4.news.pas.earthlink.net>...
> Carl Banks:
> > BTW, you don't know this, but since you're using 2.3, you should
> > probably start using "file" instead of open:
> 
> Something I rather don't like given how much old code I have
> which uses 'file' as a variable.  Ditto for quite a few pieces of the
> standard library.
> 
>                     Andrew
>                     dalke at dalkescientific.com




More information about the Python-list mailing list