Answers for "python search for a word in a list python"

0

python find word in list

ls = ['Hello from AskPython', 'Hello', 'Hello boy!', 'Hi']
 
matches = [match for match in ls if "Hello" in match]
 
print(matches)
Posted by: Guest on June-10-2021

Code answers related to "python search for a word in a list python"

Python Answers by Framework

Browse Popular Code Answers by Language