Syntax of 'in' : searching a list for a string

Erik Max Francis max at alcyone.com
Mon Mar 22 05:42:21 EST 2004


MarieR wrote:

> I want to check whether the string 'Remove' is present in a list
> 'supportList',
> but if I do
> 
> if ('Remove') in supportList:
> 
> or
> 
> if 'Remove' in supportList:
> 
> I get the error message
> 
> 'in ' requires character as left operand.

It likely means that supportList is not what you think it is.

-- 
 __ Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
/  \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ There's a reason why we / Keep chasing morning
    -- Sandra St. Victor



More information about the Python-list mailing list