check if word contains a word in a list python
if any(word in 'some one long two phrase three' for word in list_):
check if word contains a word in a list python
if any(word in 'some one long two phrase three' for word in list_):
how to check if a string contains a word python
if word in mystring:
print('success')
python check if string contains substring
string = "My favourite programming language is Python"
substring = "Python"
if substring in string:
print("Python is my favorite language")
elif substring not in string:
print("Python is not my favourite language")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us