Is there a python function that I can use to detect if a substring exists anywhere within another string? I did not come across anything in the Python string module that would allow me to do this. Any help would be appreciated. - Asad
Asad Habib wrote:
Is there a python function that I can use to detect if a substring exists anywhere within another string? I did not come across anything in the Python string module that would allow me to do this. Any help would be appreciated.
http://docs.python.org/lib/string-methods.html Look for 'find'. --jcc
Asad Habib wrote:
Is there a python function that I can use to detect if a substring exists anywhere within another string? I did not come across anything in the Python string module that would allow me to do this. Any help would be appreciated.
Check for something like 'substring in string' (not a function and iirc requires a "recent" python, 2.2 or 2.3 not sure). HTH -- //// (@ @) ----------------------------oOO----(_)----OOo-------------------------- <> Ojo por ojo y el mundo acabara ciego /\ Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain) -----------------------------------------------------------------------
participants (3)
-
Asad Habib -
J Cameron Cooper -
SER.RI-TIC-Alexis Roda