Does Python have a string contains method?

Answer

You can use the in operator:

ifnot"blah"in somestring:continue

Or more idiomatically:

if"blah"notin somestring:continue

All string Questions

Ask your interview questions on string

Write Your comment or Questions if you want the answers on string from string Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---