The in operator

The word in is a Boolean operator that takes two string and returns True if the first appears as a substring in the second:
>>> word = 'hello'
>>> 'e' in word
True
>>> 'l' in word
True

Nema komentara:

Objavi komentar