How to find if a string contains the substring in Python ?
A substring is a small portion of the string. When working with strings, a common use case is to check if a given substring is present in a string or not. Python supports various built-in functions which can be used to find if a string contains the given substring or not. In today’s short tutorial let’s learn different ways of checking if a string contains the substring in Python. Note: In certain cases, the kind of strings you get to work on is not in your control. You might get None object or an empty string. Not all the methods … Read more