 What is going on ladies and gentlemen root from no shell.com back with you guys here again and today We're gonna be checking out more boolean functions for the string function or the string data type I'm sorry in Python. So let's fire up idle and let's create some some cool stuff here Let's call this file.python I guess we don't really have to spell it right, but you know It's always good practice to spell things right and let's create a class here base Define a constructor self Our comments going on If names equal to Okay, so let's create a string variable here self.string can be equal to This is a string Keep it easy as always and now we can run this now What we're gonna be checking out today is a is another built-in string function Of course, and it's going to be the is lower function and that is a boolean function It'll return a truer false type obviously and it's going to tell us if the string is full of lowercase characters In our case, this is gonna return false because we have this t in there We have this capital t any we have we have a space in there If we define if we actually print this False, but if we take out this t it'll return true because okay, so what it's doing is it's looking for Only string variables or only lowercase variables. I'm sorry lowercase character sets. So let's check out how this is done Let's create a new function ourselves. We can test actually start. We're gonna create a function is lower self and the string Let's start testing. So let's do actually we're gonna want to import our string module Remember that because we need to we need to do some testing here for characters and that sort of thing So for character in Let's see What am I saying in the string? We actually want to change this to a different name to a string to look in Because we have if we have that string as our variable name We're not going to be able to access that module because they have a they have the same name So it's going to get confused and think of it differently. So we should change this to string to look in So for each character though if the character is in String dot ASCII letters So if it's a letter We should test if character is Not in I wonder if it'll work that way I wonder because usually I would use not preceding the condition But I wonder if character if not character not in a string dot Lowercase we remember we should use ASCII here ASCII lowercase Can return false? We break out of the loop though, and we're done processing we can return true otherwise So let's try this print self dot is lower We can pass in self dot string and this will return true if we put in that capital T That'll return false. Okay, so it looks like this is going to work correctly for us We have if the character is not in this hit thing right here But if it's a letter only if it's a letter we should be worried about it If it's not if it's like a space character or an exclamation point We don't have we don't really have to care about it But if it's anything that isn't if it's a capital letter then dude we better we better freak out We better just call the police or something because it's not all lowercase So but if it is though and we've we've done loop we are finished looking looping Looping and looking through the string. I'm Christopher walk in all of a sudden If we're done looking and looping through the string and we haven't found any problems we can just say yeah We can return true Whatever works for me, and this is exactly how it's set up. So if we do This is a string and we just have a random capital Ri capital I at the end it's still going to return false because we've still found something that we don't want to see in here So this is exactly how it works We the normal function that you you would normally be looking at is the string variable And then with a dot selector you can use the is lower function But the one that we created that works at a pretty much the same way You can this is how it works you loop through it, and you return some Boolean variables if you need to And there you go guys. Thank you for watching. Thank you for sticking with me And we'll be checking out some more functions a lot like this in the coming tutorials. See you soon. Bye