In core python programming,2nd edition.
6.3 Strings and Operators.
"The membership question asks whether a (sub)string appears in a (nother) string. true is returned if that character appears in the string and False otherwise. Note that the membership operation is not used to determine if a substring is within a string. Such functionality can be accomplished by using the string methods or string module functions find() or index() (and their brethren rfind() and rindex()). "
I'm confused by this.So what dose it mean by saying"Note that the membership operation is not used to determine if a substring is within a string." Shouldn't i use in or not in to find out whether a substring is within a string?
indexandfindreturn a location instead of just true/false.