Jul-22-2020, 05:11 PM
well, first of all it should be dynamic, because the string will differ each time.
I tried this:
I tried this:
some_string = 'there is a big apple, but i like banana more than orange' some_list = ['apple', 'banana', 'orange'] for word in some_list: if word in some_string: print(True)in that case output was:
Output:True
True
True
but i need to get return one True or one False