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
LATEST TUTORIALS
APPROVED BY CLIENTS