New course! Every coder should learn Generative AI!
Try a free lesson0
Logic in this
word1= "welcome" word2="home" r=[] for x in word1: if x in word2: r.append(x) print(r[2]+r[1]+r[2])
3 Answers
word1= "welcome" word2="home" r=[] for x in word1: if x in word2: r.append(x) print(r[2]+r[1]+r[2])