特定の単語を形成するすべての文字が特定の文字列に含まれているかどうかを確認する必要があります。私は何かを試しましたが、うまくいきません:
def check(texto, control):
for letra in control:
if texto.find(letra) == control.find(letra):
return control + " is not here"
else:
return control + " is here!"
print check('jshdgfyrgj', 'Correo')
「Correo is not here」を返す必要があります
print check('cfgotyrrtepo', 'Correo')
「Correo is here!」を返す必要があります。
現在、すべてのケースで correo is here が返されます。私のコードの何が問題なのですか? ありがとう!