0

In the pro program to build a search engine in list operations there is no list to search from it

how am I supposed to write a program to build a search engine when there is no list

2nd Jan 2021, 10:35 PM
Cipher
Cipher - avatar
4 Antworten
+ 3
You do not need to build a list. The program is passing a string in the line: s = input() In this exercise this string is ‘the list’. Therefore it is within this string that you need to search for the character “a”. Something like this should work: if "a" in s: print("Match") else: print("No match")
3rd Jan 2021, 6:02 AM
Elizabeth Kelly
Elizabeth Kelly - avatar
+ 2
Clarify the language and excercise number (ie 6.2) the issue is related to.
3rd Jan 2021, 1:21 AM
Elizabeth Kelly
Elizabeth Kelly - avatar
0
s = input() if "a" in s: print("Match") else: print("No match") #try this
3rd Apr 2021, 3:51 PM
Abu Hurerah Giri
Abu Hurerah Giri - avatar
- 1
python In list opertion You are building a search system and need to search for the character 'a' in an input string. Output "Match" if 'a' is found in the string, and "No match" if it's not. s = input() words = ["asd","spam","eggs"] if s in words : print ("Match") else : print ("No match") # i created those words list using first three test case # but last two test case are locked . unless sololearn gives the list how am I supposed to write this program
3rd Jan 2021, 4:40 AM
Cipher
Cipher - avatar