feature request: string.contains('...')

Wolfgang Rohdewald wolfgang at rohdewald.de
Fri Sep 24 10:10:53 CEST 2010


On Freitag 24 September 2010, Wim Feijen wrote:
>  would really like having a string.contains('...') function
> which returns either True or False. I know I can mimick this
> behaviour by saying string.find('...') != -1 , however, I
> find this harder to read.

>>> a = 'xy134'
>>> '13' in a
True
>>> '15' in a
False
>>> 

-- 
Wolfgang



More information about the Python-list mailing list