Hello,
I´m trying to write a code create a little searching mashine. The code should be able to tell me by finding parts of a string or word that it is fond.
I have written the following code:
I´m trying to write a code create a little searching mashine. The code should be able to tell me by finding parts of a string or word that it is fond.
I have written the following code:
string1 = ["This is awesome", "awesome"] def search(text, word): if text in string1 or word in string1: return "Word found" else: return "Word not found" text = str(input()) word = str(input()) print(search(text, word))it doesent work properly. If I type in "this is some tex" or "some" the code tells me that it doesent find anythink. But it should. Can someone help me with that? What did I miss. Thx
buran write Mar-14-2021, 03:47 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.