Should be replying to the list....Sorry :(

On Thu, Apr 3, 2008 at 11:14 AM, Sander Sweers <[EMAIL PROTECTED]> wrote:
> On Thu, Apr 3, 2008 at 8:21 AM, Jeffrey Dates <[EMAIL PROTECTED]> wrote:
>  > > > 3rd alternative: if c > 'm': print c
>
>  <snip>
>
>
>  > "Write a program that prints the first letter of a string that comes after
>  > 'm' in the alphabet."
>  >
>  > s = "this is my string"
>  > for i in s:
>  >   if i > 'm':
>  >     print i
>  >     break
>
>  One potential problem you will have is with upper case letters.
>
>  >>> 'N' > 'm'
>  False
>
>  To make input all lower case use .lower()
>
>  >>> 'N'.lower() > 'm'
>  True
>
>  Greets
>  Sander
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to