 Let's say we have a string, and we want to classify each character as a letter, upper or lower case, a digit, or other. We'll loop through the string one character at a time. Because we can compare strings, we can have an if statement like this to see if the character is greater than or equal to a capital A and less than or equal to a capital Z. If that's true, we'll print that the character is upper case. Otherwise it might be lower case when the character is greater than or equal lower case A and less than or equal to lower case Z. Then we'll print the character is lower case. Similarly for a digit, then the range will be the character zero and the character nine. And the character is a digit. Otherwise we'll say that the character is not a letter or a digit. And let's run the program. And there are the results. However, the world is a big place and there are a lot of different alphabets. And their character codes don't fit our simplistic definition of letters, as you'll see when we run the program with this string. Luckily, Python gives you methods that let you determine a character's classification. We'll modify the program to use the isUpper method. If char dot is upper, it's upper case. Otherwise, if it's lower case with the isLower method, we can use char dot isDigit to classify the letter as a digit. And everything else will be other. Let's put another character in here. And now when we run the program, we've almost got it working except for this Japanese character, because Japanese characters aren't either upper or lower case, but they are alphabetic. Let's add a little bit of extra code here. Otherwise, if char dot is alpha, so it may not be upper case, it may not be lower case, but it's an alphabetic character, then we'll print that the character is alphabetic. And now let's run the program again, and things are classified correctly. One extra note, you can use these methods on a multi-character string. For example, if I set the string s to the word classify, I can say s dot is alpha, and it will return true if all of the characters are alphabetic. If I set it to classify with a question mark at the end and ask, is the whole string alphabetic? I'll get false. You can see a list of the classifier methods and all the string methods at docs dot python dot org.