in operator for strings

Moosebumps moosebumps at moosebumps.mb
Tue May 25 04:56:19 EDT 2004


Wouldn't it be cool if you could do this?

('hello','test') in 'blah blah hello blah test':

and it would say if all elements of the list are in the string?

it would be more efficient and more readable than:

'hello' in 'blah blah hello blah test' and 'test' in 'blah blah hello blah
test'





More information about the Python-list mailing list