the in operator the word in is boolean operator that takes two strings and returns true if the first appears as substring in the second'ain 'bananatrue 'seedin 'bananafalse string comparison the comparison operators work on strings to see if two strings are equalif word ='banana'print('all rightbananas 'other comparison operations are useful for putting words in alphabetical orderif word 'banana'print('your word,word 'comes before banana 'elif word 'banana'print('your word,word 'comes after banana 'elseprint('all rightbananas 'python does not handle uppercase and lowercase letters the same way that people do all the uppercase letters come before all the lowercase letterssoyour wordpineapplecomes before banana common way to address this problem is to convert strings to standard formatsuch as all lowercasebefore performing the comparison keep that in mind in case you have to defend yourself against man armed with pineapple string methods strings are an example of python objects an object contains both data (the actual string itselfand methodswhich are effectively functions that are built into the object and are available to any instance of the object python has function called dir which lists the methods available for an object the type function shows the type of an object and the dir function shows the available methods