Computer Science, asked by priyachowdaryvykunta, 7 months ago

given a query string s and a list of all possible words return all words that have s as prefix
s ="de"
words =["dog ","deer","deal"]​

Answers

Answered by Crazy1python
6

Answer:

Explanation:

s='de'

words=['dog','deer','deal']

for i in words:

              if i[0]=='d' and i[1] == 'e':

                    print(i)

Similar questions