Drop links or images here to add them to the editor.

Met de in-operator kun je controleren of een teken of groepje tekens in een string voorkomt:

print("V" in "Voetbal")       # True
print("t" in "Voetbal")       # True
print("bal" in "Voetbal")     # True
print("r" in "Voetbal")       # False
print("p" not in "Voetbal")   # True (p komt NIET voor)

Je kunt in ook gebruiken in een if:

woord = "informatica"
if "a" in woord:
    print("De letter a zit in het woord")