this example builds on the one found in the previous section howeverit lets the user provide variable-length string when the string is longer than six charactersthe application stops processing it the if statement contains the conditional code when letternum is greater than it means that the string is too long notice the second level of indentation used for the if statement in this casethe user sees an error message stating that the string is too longand then the code executes break to end the loop choose runrun module you see python shell window open with prompt asking for input type hello and press enter the application lists each character in the stringas shown in figure - perform steps and againbut type am too long instead of hello the application displays the expected error message and stops processing the string at character as shown in figure - figure - short string is successfully processed by the application this example adds length checking to your repertoire of application data error checks shows how to perform range checkswhich ensure that value meets specific limits the length check is necessary to ensure that dataespecially stringsaren' going to overrun the size of data fields in additiona small input size makes it harder for intruders to perform certain types of hacks on your systemwhich makes your system more secure