 Hey, what's going on guys root of the knoll here back with some more python now in the last video We were checking out whether or not a string was was full of lowercase characters now in this video We're gonna do that exact same thing, but we're gonna test whether it's an uppercase characters So this is a lot of that same idea of looping through the string and testing for the character obviously But we are gonna do it with uppercase characters So all we really have to do is write the same code that we did last video But change a variable like you're gonna be looking for the ASCII uppercase characters instead of the ASCII lowercase variables But hey, let's give it a go anyway, and let's see what we can do I'm gonna create a new function here. I'm a new function anyway, but a new Python script File.python usr bin environment Python class base look at this Define initialize pass in self Some some comments going here. We can test whether this is the current script that we're running Oh got a random P in there. That's weird equals base All right, so let's get a string variable first off string self.string equals string how about that? So now we can check out what we're gonna be looking at today. We can use self.string is Lower and that's the one that we're looking at in the last video But we're gonna be using is upper so we can test if all the characters that we find in here Or at least the letters or the alphabetic characters if any of them if they're all uppercase So in this case, we will print this out and see what that function gives us false because none of these are upper if we had string It's gonna return false because we want to have all of these be the uppercase form So now that will return true because these are all uppercase. So let's see how this is done Let's create a new function here define is upper self and then string For character, we're gonna want to loop through that string and remember we should change the name of it Character to look in string to look in we can test if the character is in string.asci Letters now remember we do have to import the string module because we're gonna be able to look through some of the letters that we would normally Be working with so import string right up at the top of your file here And now if it's a letter we're gonna want to test If that character is not in string.asci uppercase We've got a problem We can just so we can just break out of our function break out of the loop and everything we can just say nope This is not the way that it should be But if we do go through the loop and we don't have a problem we can just say yeah, that's fine We can return true So now if we run this but first we should probably set up the function call self dot is upper We can pass in self dot string and That's gonna return true because string is still full of all of these uppercase characters if we turn one of these though into a string is a Non-believer String is a non-believer. I have no idea what I'm saying We still have some some lowercase characters in here. So this is a problem if we if we Actually have all of them be uppercase though We still have white space and we still have these but it's still gonna return true because all the characters that we're looking at Are uppercase but if we have one of them be wrong then dude you better you better start praying But hey All right guys, I know this one is very simple It's very similar to the last tutorial that we were looking at and really that's all for now We can just loop through some of the great things that the string module supplies for us And we are all set to go. So thank you guys for watching. I hope you enjoyed this I hope you're able to figure out how that The built-in function works here and Remember that we're all able to do all of this without the string module if we just use that chr function and Loop through the numbers that we know of in the ASCII table or we could really manually type in each letter and store that in an Array, but that's kind of obnoxious. We could just go like letters and be set that to We could have a and we could Have B and we have C and all that but it'd be very very obnoxious So what we do is we do loop through the ASCII table and use that chr function But the import string module at least the string module lets us even solve that problem in itself So it's very convenient and I hope you guys can take advantage of that But hey, thank you guys for watching again and be cool if maybe you could like the video Maybe leave me a comment and maybe even subscribe. I don't know it's whatever you want to do But thanks again guys. I'll see you in the next video. Bye