On May 6, 7:00 am, Christian Heimes <li...@cheimes.de> wrote:
> Am 06.05.2011 12:47, schrieb Lutfi Oduncuoglu:
>
> > Hi,
>
> > I am trying to write a script and I realised that I need to use something
> > like
>
> > if ('a' or 'b' or 'c')  not in line:
> >    print line
>
> > But it does not work for. What may be the problem
>
> if any(s not in line for s in ('a', 'b', 'c')):
>    # do something
>
> Christian

sets could also work

if set('abc') & set(line) == set():
     print line
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to