Exercise: Create a variable containing a word. Answer with True if the word contains the letter 'j' otherwise answer with False. Use the in operator.
word = "jump"
if word in "j": variable = True else: variable = False
I get false. What's wrong?
Aucun commentaire:
Enregistrer un commentaire