"Terry Carroll" <[EMAIL PROTECTED]> wrote

>   if Y in X:
>
> Which is much more elegant/pythonic; but I didn't know you could do 
> that
> with one string over another.  For some reason, I had thought Y 
> would have
> to exactly match one iterable element in X (e.g., one element of a 
> list,
> or one character of a string) for that to work.

FWIW I believe that 'in' did only work for single characters up until
version 2.X so your ideas may have been based on experiences with
an earlier Python version.

Alan G. 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to