Question #123813

Write a function for checking all alphabets in a word that are consisted in another word or not.

def reveal(first,second): that return boolean.

For example:

reveal(“Hokpolimio”, “Hpm”) = True #“H” ,”p”,”m” are in “Hokpolomio”

reveal(“Banana”,”Bka”) =False

Expert's answer

def reveal(first, second):
    check = False
    for i in second:
        if i in first:
            check = True
        else:
            check = False
    return check

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS