figure shows flowchart of this approach to sentinel loops you can see that this implementation is faithful to the first rule of sentinel loopsavoid processing the sentinel value get next data item item is the sentinel yes no process the item figure loop-and- -half implementation of sentinel loop pattern the choice of whether to use break statements or not is largely matter of taste either style is acceptable one temptation that should generally be avoided is peppering the body of loop with multiple break statements the logic of loop is easily lost when there are multiple exits howeverthere are times when even this rule should be broken to provide the most elegant solution to problem boolean expressions as decisions so farwe have talked about boolean expressions only within the context of other control structures sometimesboolean expressions themselves can act as control structures in factboolean expressions are so flexible in python that they can sometimes lead to subtle programming errors consider writing an interactive loop that keeps going as long as the user response starts with " to allow the user to type either an upper or lower case responseyou could use loop like thiswhile response[ ="yor response[ =" "you must be careful not to abbreviate this condition as you might think of it in english"while the first letter is 'yor ' "the following form does not work while response[ ="yor " "in factthis is an infinite loop understanding why this condition is always true requires digging into some idiosyncrasies of python boolean expressions