word1= "welcome" word2="home" r=[] for x in word1: if x in word2: r.append(x) print(r[2]+r[1]+r[2])
Impara in modo più efficiente, gratuitamente:
Introduzione a Python
7,1M studenti
Introduzione a Java
4,7M studenti
Introduzione a C
1,5M studenti
Introduzione a HTML
7,5M studenti