feature request: string.contains('...')
jjposner at optimum.net
Fri Sep 24 16:10:26 CEST 2010
On 9/24/2010 4:21 AM, Peter Otten wrote:
> If you are not interested in the position of the substr use the "in"
> if substr in s:
> print "found"
> print "not found"
Another "missing feature" candidate: sublist
>>> 'bc' in 'abcde'
>>> list('bc') in list('abcde')
A little Googling indicates that Haskell *does* have this feature: 
ghci> [2,6] `isInfixOf` [3,1,4,1,5,9,2,6,5,3,5,8,9,7,9]
I haven't located an equivalent Python idiom, though. I took a quick
look through numpy, but no luck. Can anyone help?
More information about the Python-list