Answer to Question #123813 in Python for Son

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
1
Expert's answer
2020-06-25T08:00:44-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS