Check if String Contains Substring using Python

in operator

text = 'Checking if a string contains a substring'
result = 'if' in text

print(result)

Leave a Comment

Cancel reply

Your email address will not be published.