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
4 Réponses
+ 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")
+ 2
Clarify the language and excercise number (ie 6.2) the issue is related to.
0
s = input()
if "a" in s:
print("Match")
else:
print("No match")
#try this
- 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