You are probably using Python 1.5.2, whereas Michel was using a more recent build. In 1.5.2, use the string module: import string n = raw_input("Guess a number between 1 and 100") n = string.lower(n) String methods (the ability to say "Foo".lower()) was added in Python 1.6. -Randy
-----Original Message----- From: Peter Bengtsson [mailto:mail@peterbe.com] Sent: Thursday, July 19, 2001 7:42 AM To: michel@digicool.com; zope@zope.org Subject: [Zope] lower(), how?
I saw this in your http://www.zope.org/Documentation/Articles/ZODB1
choice=raw_input("Press 'L' to list employees, 'A' to add" "an employee, or 'Q' to quit:") choice=choice.lower()
I can't get that lower() thing to work. I tried for example:
n = raw_input("Guess a number between 1 and 100") n.lower()
but I just get
AttributeError: 'string' object has no attribute 'lower'
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )